/* package whatever; // don't place package name! */
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import java.util.regex.Matcher;

/* Name of the class has to be "Main" only if the class is public. */
class  RoundhouseKick9
{
  public static void main (String[] args) throws java.lang.Exception{
     List<String> Regex = new ArrayList<String>();
     Regex.add("hello");           // a
     Regex.add("[^0-9A-Z]$") ;     // b
     Regex.add("\\w\\w\\w\\w\\w"); // c
     Regex.add("\\w\\w");          // d
     Regex.add("^\\w* \\w*$");     // e
     Regex.add("^\\w* \\w*!$");    // f
     Regex.add("^\\w* [\\w!]*$");  // g
     Regex.add("\\w{5} \\w+");     // h
     Regex.add("\\w{5} \\w+$");    // i
     for (String reg : Regex) {
       boolean b1 = Pattern.matches(reg, "Hello World");
       boolean b2 = Pattern.matches(reg, "What do we say to PABS? - Not today!");
       System.out.print(b1); System.out.print(", "); System.out.println(b2);
     }
  }
}
