import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if ('A' == (S.charAt(0)) &&
				(String.valueOf(S.charAt(1)).toLowerCase()).equals(String.valueOf(S.charAt(1))) &&
				(String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals(String.valueOf(S.charAt(S.length() - 1)))) {
			for (int i = 2; i < S.length(); i++) {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			}
		}
		System.out.println(result);
	}
} 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();
		String result = "WA";
		if ('A' == (S.charAt(0)) &&
				(String.valueOf(S.charAt(1)).toLowerCase()).equals(String.valueOf(S.charAt(1))) &&
				(String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals(String.valueOf(S.charAt(S.length() - 1)))) {
			for (int i = 2; i < S.length(); i++) {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			}
		}
		System.out.println(result);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if ('A' == (S.charAt(0)) &&
				(String.valueOf(S.charAt(1)).toLowerCase()).equals(String.valueOf(S.charAt(1))) &&
				(String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals(String.valueOf(S.charAt(S.length() - 1)))) {
			for (int i = 2; i < S.length(); i++) {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			}
		}
		System.out.println(result);
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if ('A' == (S.charAt(0)) &&
				(String.valueOf(S.charAt(1)).toLowerCase()).equals(String.valueOf(S.charAt(1))) &&
				(String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals(String.valueOf(S.charAt(S.length() - 1)))) {
			for (int i = 2; i < S.length(); i++) {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			}
		}
		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String result = "WA"; result "WA" if ('A' == (S.charAt(0)) &&
				(String.valueOf(S.charAt(1)).toLowerCase()).equals(String.valueOf(S.charAt(1))) &&
				(String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals(String.valueOf(S.charAt(S.length() - 1)))) {
			for (int i = 2; i < S.length(); i++) {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			}
		} 'A' == (S.charAt(0)) &&
				(String.valueOf(S.charAt(1)).toLowerCase()).equals(String.valueOf(S.charAt(1))) &&
				(String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals(String.valueOf(S.charAt(S.length() - 1))) 'A' == (S.charAt(0)) &&
				(String.valueOf(S.charAt(1)).toLowerCase()).equals(String.valueOf(S.charAt(1))) &&
				(String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals(String.valueOf(S.charAt(S.length() - 1))) 'A' == (S.charAt(0)) 'A' (S.charAt(0)) S.charAt S 0 (String.valueOf(S.charAt(1)).toLowerCase()).equals(String.valueOf(S.charAt(1))) (String.valueOf(S.charAt(1)).toLowerCase()).equals (String.valueOf(S.charAt(1)).toLowerCase()) String.valueOf(S.charAt(1)).toLowerCase String.valueOf(S.charAt(1)) String.valueOf String S.charAt(1) S.charAt S 1 String.valueOf(S.charAt(1)) String.valueOf String S.charAt(1) S.charAt S 1 (String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals(String.valueOf(S.charAt(S.length() - 1))) (String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals (String.valueOf(S.charAt(S.length() - 1))).toLowerCase() (String.valueOf(S.charAt(S.length() - 1))).toLowerCase (String.valueOf(S.charAt(S.length() - 1))) String.valueOf String S.charAt(S.length() - 1) S.charAt S S.length() - 1 S.length() S.length S 1 String.valueOf(S.charAt(S.length() - 1)) String.valueOf String S.charAt(S.length() - 1) S.charAt S S.length() - 1 S.length() S.length S 1 {
			for (int i = 2; i < S.length(); i++) {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			}
		} for (int i = 2; i < S.length(); i++) {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			} int i = 2; int i = 2; i 2 i < S.length() i S.length() S.length S i++ i++ i {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			} {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			} if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				} 'C' == S.charAt(i) 'C' S.charAt(i) S.charAt S i {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					} "WA".equals(result) "WA".equals "WA" result {
						result = "AC";
					} result = "AC" result "AC" {
						result = "WA";
						break;
					} result = "WA" result "WA" break; if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				} !(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i))) (String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i))) (String.valueOf(S.charAt(i)).toLowerCase()).equals (String.valueOf(S.charAt(i)).toLowerCase()) String.valueOf(S.charAt(i)).toLowerCase String.valueOf(S.charAt(i)) String.valueOf String S.charAt(i) S.charAt S i String.valueOf(S.charAt(i)) String.valueOf String S.charAt(i) S.charAt S i {
					result = "WA";
					break;
				} result = "WA" result "WA" break; System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if ('A' == (S.charAt(0)) &&
				(String.valueOf(S.charAt(1)).toLowerCase()).equals(String.valueOf(S.charAt(1))) &&
				(String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals(String.valueOf(S.charAt(S.length() - 1)))) {
			for (int i = 2; i < S.length(); i++) {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			}
		}
		System.out.println(result);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if ('A' == (S.charAt(0)) &&
				(String.valueOf(S.charAt(1)).toLowerCase()).equals(String.valueOf(S.charAt(1))) &&
				(String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals(String.valueOf(S.charAt(S.length() - 1)))) {
			for (int i = 2; i < S.length(); i++) {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			}
		}
		System.out.println(result);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if ('A' == (S.charAt(0)) &&
				(String.valueOf(S.charAt(1)).toLowerCase()).equals(String.valueOf(S.charAt(1))) &&
				(String.valueOf(S.charAt(S.length() - 1))).toLowerCase().equals(String.valueOf(S.charAt(S.length() - 1)))) {
			for (int i = 2; i < S.length(); i++) {
				if ('C' == S.charAt(i)) {
					if ("WA".equals(result)) {
						result = "AC";
					} else {
						result = "WA";
						break;
					}
				} else if (!(String.valueOf(S.charAt(i)).toLowerCase()).equals(String.valueOf(S.charAt(i)))) {
					result = "WA";
					break;
				}
			}
		}
		System.out.println(result);
	}
}
