import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 文字列の入力
		String s = sc.next();
    
		// 出力
		System.out.println(check(s) ? "AC" : "WA");
	}
    public static boolean check(String value) {
      ArrayList<Integer> list = new ArrayList<>();
      for(int i = 0; i < value.length(); i++) {
        if (Character.isUpperCase(value.charAt(i))) {
          list.add(i);
        }
      }
      if (list.size() != 2) {
        return false;
      }
      if (list.get(0) != 0) {
        return false;
      }
      if (list.get(1) < 2 || list.get(1) > value.length() - 2) {
        return false;
      }
      if (!String.valueOf(value.charAt(0)).equals("A")) {
        return false;
      } 
      return String.valueOf(value.charAt(list.get(1))).equals("C");
   }
      
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 文字列の入力
		String s = sc.next();
    
		// 出力
		System.out.println(check(s) ? "AC" : "WA");
	}
    public static boolean check(String value) {
      ArrayList<Integer> list = new ArrayList<>();
      for(int i = 0; i < value.length(); i++) {
        if (Character.isUpperCase(value.charAt(i))) {
          list.add(i);
        }
      }
      if (list.size() != 2) {
        return false;
      }
      if (list.get(0) != 0) {
        return false;
      }
      if (list.get(1) < 2 || list.get(1) > value.length() - 2) {
        return false;
      }
      if (!String.valueOf(value.charAt(0)).equals("A")) {
        return false;
      } 
      return String.valueOf(value.charAt(list.get(1))).equals("C");
   }
      
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 文字列の入力
		String s = sc.next();
    
		// 出力
		System.out.println(check(s) ? "AC" : "WA");
	} main {
		Scanner sc = new Scanner(System.in);

		// 文字列の入力
		String s = sc.next();
    
		// 出力
		System.out.println(check(s) ? "AC" : "WA");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc System.out.println(check(s) ? "AC" : "WA") System.out.println System.out System System.out check(s) ? "AC" : "WA" check(s) check s "AC" "WA" String[] args args public static boolean check(String value) {
      ArrayList<Integer> list = new ArrayList<>();
      for(int i = 0; i < value.length(); i++) {
        if (Character.isUpperCase(value.charAt(i))) {
          list.add(i);
        }
      }
      if (list.size() != 2) {
        return false;
      }
      if (list.get(0) != 0) {
        return false;
      }
      if (list.get(1) < 2 || list.get(1) > value.length() - 2) {
        return false;
      }
      if (!String.valueOf(value.charAt(0)).equals("A")) {
        return false;
      } 
      return String.valueOf(value.charAt(list.get(1))).equals("C");
   } check {
      ArrayList<Integer> list = new ArrayList<>();
      for(int i = 0; i < value.length(); i++) {
        if (Character.isUpperCase(value.charAt(i))) {
          list.add(i);
        }
      }
      if (list.size() != 2) {
        return false;
      }
      if (list.get(0) != 0) {
        return false;
      }
      if (list.get(1) < 2 || list.get(1) > value.length() - 2) {
        return false;
      }
      if (!String.valueOf(value.charAt(0)).equals("A")) {
        return false;
      } 
      return String.valueOf(value.charAt(list.get(1))).equals("C");
   } ArrayList<Integer> list = new ArrayList<>(); list new ArrayList<>() for(int i = 0; i < value.length(); i++) {
        if (Character.isUpperCase(value.charAt(i))) {
          list.add(i);
        }
      } int i = 0; int i = 0; i 0 i < value.length() i value.length() value.length value i++ i++ i {
        if (Character.isUpperCase(value.charAt(i))) {
          list.add(i);
        }
      } {
        if (Character.isUpperCase(value.charAt(i))) {
          list.add(i);
        }
      } if (Character.isUpperCase(value.charAt(i))) {
          list.add(i);
        } Character.isUpperCase(value.charAt(i)) Character.isUpperCase Character value.charAt(i) value.charAt value i {
          list.add(i);
        } list.add(i) list.add list i if (list.size() != 2) {
        return false;
      } list.size() != 2 list.size() list.size list 2 {
        return false;
      } return false; false if (list.get(0) != 0) {
        return false;
      } list.get(0) != 0 list.get(0) list.get list 0 0 {
        return false;
      } return false; false if (list.get(1) < 2 || list.get(1) > value.length() - 2) {
        return false;
      } list.get(1) < 2 || list.get(1) > value.length() - 2 list.get(1) < 2 list.get(1) list.get list 1 2 list.get(1) > value.length() - 2 list.get(1) list.get list 1 value.length() - 2 value.length() value.length value 2 {
        return false;
      } return false; false if (!String.valueOf(value.charAt(0)).equals("A")) {
        return false;
      } !String.valueOf(value.charAt(0)).equals("A") String.valueOf(value.charAt(0)).equals("A") String.valueOf(value.charAt(0)).equals String.valueOf(value.charAt(0)) String.valueOf String value.charAt(0) value.charAt value 0 "A" {
        return false;
      } return false; false return String.valueOf(value.charAt(list.get(1))).equals("C"); String.valueOf(value.charAt(list.get(1))).equals("C") String.valueOf(value.charAt(list.get(1))).equals String.valueOf(value.charAt(list.get(1))) String.valueOf String value.charAt(list.get(1)) value.charAt value list.get(1) list.get list 1 "C" String value value public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 文字列の入力
		String s = sc.next();
    
		// 出力
		System.out.println(check(s) ? "AC" : "WA");
	}
    public static boolean check(String value) {
      ArrayList<Integer> list = new ArrayList<>();
      for(int i = 0; i < value.length(); i++) {
        if (Character.isUpperCase(value.charAt(i))) {
          list.add(i);
        }
      }
      if (list.size() != 2) {
        return false;
      }
      if (list.get(0) != 0) {
        return false;
      }
      if (list.get(1) < 2 || list.get(1) > value.length() - 2) {
        return false;
      }
      if (!String.valueOf(value.charAt(0)).equals("A")) {
        return false;
      } 
      return String.valueOf(value.charAt(list.get(1))).equals("C");
   }
      
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 文字列の入力
		String s = sc.next();
    
		// 出力
		System.out.println(check(s) ? "AC" : "WA");
	}
    public static boolean check(String value) {
      ArrayList<Integer> list = new ArrayList<>();
      for(int i = 0; i < value.length(); i++) {
        if (Character.isUpperCase(value.charAt(i))) {
          list.add(i);
        }
      }
      if (list.size() != 2) {
        return false;
      }
      if (list.get(0) != 0) {
        return false;
      }
      if (list.get(1) < 2 || list.get(1) > value.length() - 2) {
        return false;
      }
      if (!String.valueOf(value.charAt(0)).equals("A")) {
        return false;
      } 
      return String.valueOf(value.charAt(list.get(1))).equals("C");
   }
      
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 文字列の入力
		String s = sc.next();
    
		// 出力
		System.out.println(check(s) ? "AC" : "WA");
	}
    public static boolean check(String value) {
      ArrayList<Integer> list = new ArrayList<>();
      for(int i = 0; i < value.length(); i++) {
        if (Character.isUpperCase(value.charAt(i))) {
          list.add(i);
        }
      }
      if (list.size() != 2) {
        return false;
      }
      if (list.get(0) != 0) {
        return false;
      }
      if (list.get(1) < 2 || list.get(1) > value.length() - 2) {
        return false;
      }
      if (!String.valueOf(value.charAt(0)).equals("A")) {
        return false;
      } 
      return String.valueOf(value.charAt(list.get(1))).equals("C");
   }
      
}
