public void solve(int testNumber, Scanner in, PrintWriter out) {
      while(in.hasNextLine()){
        Matcher m = Pattern.compile("[a-zA-Z]+").matcher(in.nextLine());
        int count =0;
        while(m.find()) count++;
        out.println(count);
      }
    }