import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		if(S.charAt(0) != 'A') {
			System.out.println("WA");
			System.exit(0);
		}
		int cnt = 0;
		for(int i = 2; i < S.length() - 1; i++) {
			char c = S.charAt(i);
			if(c == 'C') {
				cnt++;
			}
		}
		if(cnt != 1) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i = 0; i < S.length(); i++) {
			char c = S.charAt(i);
			if(c != 'A' && c != 'C') {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			}
		}
		System.out.println("AC");
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		if(S.charAt(0) != 'A') {
			System.out.println("WA");
			System.exit(0);
		}
		int cnt = 0;
		for(int i = 2; i < S.length() - 1; i++) {
			char c = S.charAt(i);
			if(c == 'C') {
				cnt++;
			}
		}
		if(cnt != 1) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i = 0; i < S.length(); i++) {
			char c = S.charAt(i);
			if(c != 'A' && c != 'C') {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			}
		}
		System.out.println("AC");
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		if(S.charAt(0) != 'A') {
			System.out.println("WA");
			System.exit(0);
		}
		int cnt = 0;
		for(int i = 2; i < S.length() - 1; i++) {
			char c = S.charAt(i);
			if(c == 'C') {
				cnt++;
			}
		}
		if(cnt != 1) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i = 0; i < S.length(); i++) {
			char c = S.charAt(i);
			if(c != 'A' && c != 'C') {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			}
		}
		System.out.println("AC");
	} main {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		if(S.charAt(0) != 'A') {
			System.out.println("WA");
			System.exit(0);
		}
		int cnt = 0;
		for(int i = 2; i < S.length() - 1; i++) {
			char c = S.charAt(i);
			if(c == 'C') {
				cnt++;
			}
		}
		if(cnt != 1) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i = 0; i < S.length(); i++) {
			char c = S.charAt(i);
			if(c != 'A' && c != 'C') {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			}
		}
		System.out.println("AC");
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan scan.close() scan.close scan if(S.charAt(0) != 'A') {
			System.out.println("WA");
			System.exit(0);
		} S.charAt(0) != 'A' S.charAt(0) S.charAt S 0 'A' {
			System.out.println("WA");
			System.exit(0);
		} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 int cnt = 0; cnt 0 for(int i = 2; i < S.length() - 1; i++) {
			char c = S.charAt(i);
			if(c == 'C') {
				cnt++;
			}
		} int i = 2; int i = 2; i 2 i < S.length() - 1 i S.length() - 1 S.length() S.length S 1 i++ i++ i {
			char c = S.charAt(i);
			if(c == 'C') {
				cnt++;
			}
		} {
			char c = S.charAt(i);
			if(c == 'C') {
				cnt++;
			}
		} char c = S.charAt(i); c S.charAt(i) S.charAt S i if(c == 'C') {
				cnt++;
			} c == 'C' c 'C' {
				cnt++;
			} cnt++ cnt if(cnt != 1) {
			System.out.println("WA");
			System.exit(0);
		} cnt != 1 cnt 1 {
			System.out.println("WA");
			System.exit(0);
		} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 for(int i = 0; i < S.length(); i++) {
			char c = S.charAt(i);
			if(c != 'A' && c != 'C') {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			}
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			char c = S.charAt(i);
			if(c != 'A' && c != 'C') {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			}
		} {
			char c = S.charAt(i);
			if(c != 'A' && c != 'C') {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			}
		} char c = S.charAt(i); c S.charAt(i) S.charAt S i if(c != 'A' && c != 'C') {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			} c != 'A' && c != 'C' c != 'A' c 'A' c != 'C' c 'C' {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			} if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				} !(c >= 'a' && c <= 'z') (c >= 'a' && c <= 'z') c >= 'a' c 'a' c <= 'z' c 'z' {
					System.out.println("WA");
					System.exit(0);
				} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 System.out.println("AC") System.out.println System.out System System.out "AC" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		if(S.charAt(0) != 'A') {
			System.out.println("WA");
			System.exit(0);
		}
		int cnt = 0;
		for(int i = 2; i < S.length() - 1; i++) {
			char c = S.charAt(i);
			if(c == 'C') {
				cnt++;
			}
		}
		if(cnt != 1) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i = 0; i < S.length(); i++) {
			char c = S.charAt(i);
			if(c != 'A' && c != 'C') {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			}
		}
		System.out.println("AC");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		if(S.charAt(0) != 'A') {
			System.out.println("WA");
			System.exit(0);
		}
		int cnt = 0;
		for(int i = 2; i < S.length() - 1; i++) {
			char c = S.charAt(i);
			if(c == 'C') {
				cnt++;
			}
		}
		if(cnt != 1) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i = 0; i < S.length(); i++) {
			char c = S.charAt(i);
			if(c != 'A' && c != 'C') {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			}
		}
		System.out.println("AC");
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		if(S.charAt(0) != 'A') {
			System.out.println("WA");
			System.exit(0);
		}
		int cnt = 0;
		for(int i = 2; i < S.length() - 1; i++) {
			char c = S.charAt(i);
			if(c == 'C') {
				cnt++;
			}
		}
		if(cnt != 1) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i = 0; i < S.length(); i++) {
			char c = S.charAt(i);
			if(c != 'A' && c != 'C') {
				if(!(c >= 'a' && c <= 'z')) {
					System.out.println("WA");
					System.exit(0);
				}
			}
		}
		System.out.println("AC");
	}
}