import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean c = true;
		if(s.charAt(0) != 'A' || s.substring(2, s.length()).split("C").length != 2) c = false;
		char[] set = s.toCharArray();
		if(c)for(int i = 1; i < set.length; i++) {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		}
		if(c)System.out.println("AC");
		else System.out.println("WA");
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean c = true;
		if(s.charAt(0) != 'A' || s.substring(2, s.length()).split("C").length != 2) c = false;
		char[] set = s.toCharArray();
		if(c)for(int i = 1; i < set.length; i++) {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		}
		if(c)System.out.println("AC");
		else System.out.println("WA");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean c = true;
		if(s.charAt(0) != 'A' || s.substring(2, s.length()).split("C").length != 2) c = false;
		char[] set = s.toCharArray();
		if(c)for(int i = 1; i < set.length; i++) {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		}
		if(c)System.out.println("AC");
		else System.out.println("WA");
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean c = true;
		if(s.charAt(0) != 'A' || s.substring(2, s.length()).split("C").length != 2) c = false;
		char[] set = s.toCharArray();
		if(c)for(int i = 1; i < set.length; i++) {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		}
		if(c)System.out.println("AC");
		else System.out.println("WA");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc boolean c = true; c true if(s.charAt(0) != 'A' || s.substring(2, s.length()).split("C").length != 2) c = false; s.charAt(0) != 'A' || s.substring(2, s.length()).split("C").length != 2 s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' s.substring(2, s.length()).split("C").length != 2 s.substring(2, s.length()).split("C").length s.substring(2, s.length()).split("C") s.substring(2, s.length()).split s.substring(2, s.length()) s.substring s 2 s.length() s.length s "C" s.substring(2, s.length()).split("C").length 2 c = false c false char[] set = s.toCharArray(); set s.toCharArray() s.toCharArray s if(c)for(int i = 1; i < set.length; i++) {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		} c for(int i = 1; i < set.length; i++) {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		} int i = 1; int i = 1; i 1 i < set.length i set.length set set.length i++ i++ i {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		} {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		} if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			} set[i] != 'C' && !Character.isLowerCase(set[i]) set[i] != 'C' set[i] set i 'C' !Character.isLowerCase(set[i]) Character.isLowerCase(set[i]) Character.isLowerCase Character set[i] set i {
				c = false;
				break;
			} c = false c false break; if(c)System.out.println("AC");
		else System.out.println("WA"); c System.out.println("AC") System.out.println System.out System System.out "AC" System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean c = true;
		if(s.charAt(0) != 'A' || s.substring(2, s.length()).split("C").length != 2) c = false;
		char[] set = s.toCharArray();
		if(c)for(int i = 1; i < set.length; i++) {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		}
		if(c)System.out.println("AC");
		else System.out.println("WA");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean c = true;
		if(s.charAt(0) != 'A' || s.substring(2, s.length()).split("C").length != 2) c = false;
		char[] set = s.toCharArray();
		if(c)for(int i = 1; i < set.length; i++) {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		}
		if(c)System.out.println("AC");
		else System.out.println("WA");
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean c = true;
		if(s.charAt(0) != 'A' || s.substring(2, s.length()).split("C").length != 2) c = false;
		char[] set = s.toCharArray();
		if(c)for(int i = 1; i < set.length; i++) {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		}
		if(c)System.out.println("AC");
		else System.out.println("WA");
	}
}