
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		//int R = in.nextInt();
		char[] S = in.nextLine().toCharArray();
		
		if(S[0] != 'A') {
			System.out.print("WA");
			System.exit(0);
		}
		
		if((int)S[1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		int count = 0;
		for(int i=2; i<S.length-1; i++) {
			if(S[i] == 'C') {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			}
		}
		if(count != 1) {
			System.out.print("WA");
			System.exit(0);
		}
		if((int)S[S.length-1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		System.out.print("AC");
		in.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		//int R = in.nextInt();
		char[] S = in.nextLine().toCharArray();
		
		if(S[0] != 'A') {
			System.out.print("WA");
			System.exit(0);
		}
		
		if((int)S[1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		int count = 0;
		for(int i=2; i<S.length-1; i++) {
			if(S[i] == 'C') {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			}
		}
		if(count != 1) {
			System.out.print("WA");
			System.exit(0);
		}
		if((int)S[S.length-1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		System.out.print("AC");
		in.close();
	}
} Main public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		//int R = in.nextInt();
		char[] S = in.nextLine().toCharArray();
		
		if(S[0] != 'A') {
			System.out.print("WA");
			System.exit(0);
		}
		
		if((int)S[1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		int count = 0;
		for(int i=2; i<S.length-1; i++) {
			if(S[i] == 'C') {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			}
		}
		if(count != 1) {
			System.out.print("WA");
			System.exit(0);
		}
		if((int)S[S.length-1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		System.out.print("AC");
		in.close();
	} main {
		Scanner in = new java.util.Scanner(System.in);
		//int R = in.nextInt();
		char[] S = in.nextLine().toCharArray();
		
		if(S[0] != 'A') {
			System.out.print("WA");
			System.exit(0);
		}
		
		if((int)S[1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		int count = 0;
		for(int i=2; i<S.length-1; i++) {
			if(S[i] == 'C') {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			}
		}
		if(count != 1) {
			System.out.print("WA");
			System.exit(0);
		}
		if((int)S[S.length-1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		System.out.print("AC");
		in.close();
	} Scanner in = new java.util.Scanner(System.in); in new java.util.Scanner(System.in) char[] S = in.nextLine().toCharArray(); S in.nextLine().toCharArray() in.nextLine().toCharArray in.nextLine() in.nextLine in if(S[0] != 'A') {
			System.out.print("WA");
			System.exit(0);
		} S[0] != 'A' S[0] S 0 'A' {
			System.out.print("WA");
			System.exit(0);
		} System.out.print("WA") System.out.print System.out System System.out "WA" System.exit(0) System.exit System 0 if((int)S[1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		} (int)S[1] < (int)'a' (int)S[1] S 1 (int)'a' {
			System.out.print("WA");
			System.exit(0);
		} System.out.print("WA") System.out.print System.out System System.out "WA" System.exit(0) System.exit System 0 int count = 0; count 0 for(int i=2; i<S.length-1; i++) {
			if(S[i] == 'C') {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			}
		} int i=2; int i=2; i 2 i<S.length-1 i S.length-1 S.length S S.length 1 i++ i++ i {
			if(S[i] == 'C') {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			}
		} {
			if(S[i] == 'C') {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			}
		} if(S[i] == 'C') {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			} S[i] == 'C' S[i] S i 'C' {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			} count++ count if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				} count == 2 count 2 {
					System.out.print("WA");
					System.exit(0);
				} System.out.print("WA") System.out.print System.out System System.out "WA" System.exit(0) System.exit System 0 if(count != 1) {
			System.out.print("WA");
			System.exit(0);
		} count != 1 count 1 {
			System.out.print("WA");
			System.exit(0);
		} System.out.print("WA") System.out.print System.out System System.out "WA" System.exit(0) System.exit System 0 if((int)S[S.length-1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		} (int)S[S.length-1] < (int)'a' (int)S[S.length-1] S S.length-1 S.length S S.length 1 (int)'a' {
			System.out.print("WA");
			System.exit(0);
		} System.out.print("WA") System.out.print System.out System System.out "WA" System.exit(0) System.exit System 0 System.out.print("AC") System.out.print System.out System System.out "AC" in.close() in.close in String[] args args public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		//int R = in.nextInt();
		char[] S = in.nextLine().toCharArray();
		
		if(S[0] != 'A') {
			System.out.print("WA");
			System.exit(0);
		}
		
		if((int)S[1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		int count = 0;
		for(int i=2; i<S.length-1; i++) {
			if(S[i] == 'C') {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			}
		}
		if(count != 1) {
			System.out.print("WA");
			System.exit(0);
		}
		if((int)S[S.length-1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		System.out.print("AC");
		in.close();
	}
} public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		//int R = in.nextInt();
		char[] S = in.nextLine().toCharArray();
		
		if(S[0] != 'A') {
			System.out.print("WA");
			System.exit(0);
		}
		
		if((int)S[1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		int count = 0;
		for(int i=2; i<S.length-1; i++) {
			if(S[i] == 'C') {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			}
		}
		if(count != 1) {
			System.out.print("WA");
			System.exit(0);
		}
		if((int)S[S.length-1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		System.out.print("AC");
		in.close();
	}
} Main

import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		//int R = in.nextInt();
		char[] S = in.nextLine().toCharArray();
		
		if(S[0] != 'A') {
			System.out.print("WA");
			System.exit(0);
		}
		
		if((int)S[1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		int count = 0;
		for(int i=2; i<S.length-1; i++) {
			if(S[i] == 'C') {
				count++;
				if(count == 2) {
					System.out.print("WA");
					System.exit(0);
				}
			}
		}
		if(count != 1) {
			System.out.print("WA");
			System.exit(0);
		}
		if((int)S[S.length-1] < (int)'a') {
			System.out.print("WA");
			System.exit(0);
		}
		System.out.print("AC");
		in.close();
	}
}