import java.util.*;

public class Main {
	static boolean check(String s) {
		if(s.charAt(0) != 'A')return false;
		boolean flag = false;
		for(int i = 1;i < s.length();i ++) {
			if(s.charAt(i) != 'C') {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			}
			else if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true;
		}
		return flag;
	}
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	}
} import java.util.*; util.* java public class Main {
	static boolean check(String s) {
		if(s.charAt(0) != 'A')return false;
		boolean flag = false;
		for(int i = 1;i < s.length();i ++) {
			if(s.charAt(i) != 'C') {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			}
			else if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true;
		}
		return flag;
	}
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	}
} Main static boolean check(String s) {
		if(s.charAt(0) != 'A')return false;
		boolean flag = false;
		for(int i = 1;i < s.length();i ++) {
			if(s.charAt(i) != 'C') {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			}
			else if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true;
		}
		return flag;
	} check {
		if(s.charAt(0) != 'A')return false;
		boolean flag = false;
		for(int i = 1;i < s.length();i ++) {
			if(s.charAt(i) != 'C') {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			}
			else if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true;
		}
		return flag;
	} if(s.charAt(0) != 'A')return false; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' return false; false boolean flag = false; flag false for(int i = 1;i < s.length();i ++) {
			if(s.charAt(i) != 'C') {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			}
			else if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true;
		} int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i ++ i ++ i {
			if(s.charAt(i) != 'C') {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			}
			else if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true;
		} {
			if(s.charAt(i) != 'C') {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			}
			else if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true;
		} if(s.charAt(i) != 'C') {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			}
			else if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true; s.charAt(i) != 'C' s.charAt(i) s.charAt s i 'C' {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			} if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false; s.charAt(i) >= 'A' && s.charAt(i) <= 'Z' s.charAt(i) >= 'A' s.charAt(i) s.charAt s i 'A' s.charAt(i) <= 'Z' s.charAt(i) s.charAt s i 'Z' return false; false if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true; flag || i < 2 || s.length() - i < 2 flag || i < 2 || s.length() - i < 2 flag i < 2 i 2 s.length() - i < 2 s.length() - i s.length() s.length s i 2 return false; false flag = true flag true return flag; flag String s s public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	} main {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.nextLine(); s in.nextLine() in.nextLine in if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		} check(s) check s {
			System.out.println("AC");
		} System.out.println("AC") System.out.println System.out System System.out "AC" {
			System.out.println("WA");
		} System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public class Main {
	static boolean check(String s) {
		if(s.charAt(0) != 'A')return false;
		boolean flag = false;
		for(int i = 1;i < s.length();i ++) {
			if(s.charAt(i) != 'C') {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			}
			else if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true;
		}
		return flag;
	}
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	}
} public class Main {
	static boolean check(String s) {
		if(s.charAt(0) != 'A')return false;
		boolean flag = false;
		for(int i = 1;i < s.length();i ++) {
			if(s.charAt(i) != 'C') {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			}
			else if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true;
		}
		return flag;
	}
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	}
} Main
import java.util.*;

public class Main {
	static boolean check(String s) {
		if(s.charAt(0) != 'A')return false;
		boolean flag = false;
		for(int i = 1;i < s.length();i ++) {
			if(s.charAt(i) != 'C') {
				if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')return false;
			}
			else if(flag || i < 2 || s.length() - i < 2)return false;
			else flag = true;
		}
		return flag;
	}
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	}
}
