import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
	    String S = sc.nextLine();
		int flagA = 0;
		int flagC = 0;
		int flag = 1;
		for(int i = 0; i < S.length(); i++) {
			//System.out.println("test");
			if(S.charAt(i) == 'A' && i == 0) {
				flagA = 1;
				continue;
			}
			if(i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C') {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			}
			if(Character.isUpperCase(S.charAt(i))) {
				flag = -1;
			}
		}
		if(flagA == 1 && flagC == 1 && flag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
	    String S = sc.nextLine();
		int flagA = 0;
		int flagC = 0;
		int flag = 1;
		for(int i = 0; i < S.length(); i++) {
			//System.out.println("test");
			if(S.charAt(i) == 'A' && i == 0) {
				flagA = 1;
				continue;
			}
			if(i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C') {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			}
			if(Character.isUpperCase(S.charAt(i))) {
				flag = -1;
			}
		}
		if(flagA == 1 && flagC == 1 && flag == 1) {
			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.nextLine();
		int flagA = 0;
		int flagC = 0;
		int flag = 1;
		for(int i = 0; i < S.length(); i++) {
			//System.out.println("test");
			if(S.charAt(i) == 'A' && i == 0) {
				flagA = 1;
				continue;
			}
			if(i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C') {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			}
			if(Character.isUpperCase(S.charAt(i))) {
				flag = -1;
			}
		}
		if(flagA == 1 && flagC == 1 && flag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	} main {
		Scanner sc = new Scanner(System.in);
	    String S = sc.nextLine();
		int flagA = 0;
		int flagC = 0;
		int flag = 1;
		for(int i = 0; i < S.length(); i++) {
			//System.out.println("test");
			if(S.charAt(i) == 'A' && i == 0) {
				flagA = 1;
				continue;
			}
			if(i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C') {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			}
			if(Character.isUpperCase(S.charAt(i))) {
				flag = -1;
			}
		}
		if(flagA == 1 && flagC == 1 && flag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc int flagA = 0; flagA 0 int flagC = 0; flagC 0 int flag = 1; flag 1 for(int i = 0; i < S.length(); i++) {
			//System.out.println("test");
			if(S.charAt(i) == 'A' && i == 0) {
				flagA = 1;
				continue;
			}
			if(i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C') {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			}
			if(Character.isUpperCase(S.charAt(i))) {
				flag = -1;
			}
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			//System.out.println("test");
			if(S.charAt(i) == 'A' && i == 0) {
				flagA = 1;
				continue;
			}
			if(i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C') {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			}
			if(Character.isUpperCase(S.charAt(i))) {
				flag = -1;
			}
		} {
			//System.out.println("test");
			if(S.charAt(i) == 'A' && i == 0) {
				flagA = 1;
				continue;
			}
			if(i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C') {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			}
			if(Character.isUpperCase(S.charAt(i))) {
				flag = -1;
			}
		} if(S.charAt(i) == 'A' && i == 0) {
				flagA = 1;
				continue;
			} S.charAt(i) == 'A' && i == 0 S.charAt(i) == 'A' S.charAt(i) S.charAt S i 'A' i == 0 i 0 {
				flagA = 1;
				continue;
			} flagA = 1 flagA 1 continue; if(i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C') {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			} i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C' i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C' i >= 2 i 2 i <= S.length() - 2 i S.length() - 2 S.length() S.length S 2 S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			} if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				} flagC == 0 flagC 0 {
					flagC = 1;
					continue;
				} flagC = 1 flagC 1 continue; {
					flagC = -1;
					continue;
				} flagC = -1 flagC -1 1 continue; if(Character.isUpperCase(S.charAt(i))) {
				flag = -1;
			} Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
				flag = -1;
			} flag = -1 flag -1 1 if(flagA == 1 && flagC == 1 && flag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		} flagA == 1 && flagC == 1 && flag == 1 flagA == 1 && flagC == 1 && flag == 1 flagA == 1 flagA 1 flagC == 1 flagC 1 flag == 1 flag 1 {
			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 {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
	    String S = sc.nextLine();
		int flagA = 0;
		int flagC = 0;
		int flag = 1;
		for(int i = 0; i < S.length(); i++) {
			//System.out.println("test");
			if(S.charAt(i) == 'A' && i == 0) {
				flagA = 1;
				continue;
			}
			if(i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C') {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			}
			if(Character.isUpperCase(S.charAt(i))) {
				flag = -1;
			}
		}
		if(flagA == 1 && flagC == 1 && flag == 1) {
			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.nextLine();
		int flagA = 0;
		int flagC = 0;
		int flag = 1;
		for(int i = 0; i < S.length(); i++) {
			//System.out.println("test");
			if(S.charAt(i) == 'A' && i == 0) {
				flagA = 1;
				continue;
			}
			if(i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C') {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			}
			if(Character.isUpperCase(S.charAt(i))) {
				flag = -1;
			}
		}
		if(flagA == 1 && flagC == 1 && flag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
} Main
import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
	    String S = sc.nextLine();
		int flagA = 0;
		int flagC = 0;
		int flag = 1;
		for(int i = 0; i < S.length(); i++) {
			//System.out.println("test");
			if(S.charAt(i) == 'A' && i == 0) {
				flagA = 1;
				continue;
			}
			if(i >= 2 && i <= S.length() - 2 && S.charAt(i) == 'C') {
				if(flagC == 0) {
					flagC = 1;
					continue;
				} else {
					flagC = -1;
					continue;
				}
			}
			if(Character.isUpperCase(S.charAt(i))) {
				flag = -1;
			}
		}
		if(flagA == 1 && flagC == 1 && flag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
}