import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		char s[] = sc.next().toCharArray();
		boolean b = true;
		int cnt = 0;
		if (s[0] == 'A') {

			for (int i = 1; i < s.length; i++) {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			}

		} else {
			b = false;
		}

		if (b && cnt == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		char s[] = sc.next().toCharArray();
		boolean b = true;
		int cnt = 0;
		if (s[0] == 'A') {

			for (int i = 1; i < s.length; i++) {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			}

		} else {
			b = false;
		}

		if (b && cnt == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		char s[] = sc.next().toCharArray();
		boolean b = true;
		int cnt = 0;
		if (s[0] == 'A') {

			for (int i = 1; i < s.length; i++) {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			}

		} else {
			b = false;
		}

		if (b && cnt == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		char s[] = sc.next().toCharArray();
		boolean b = true;
		int cnt = 0;
		if (s[0] == 'A') {

			for (int i = 1; i < s.length; i++) {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			}

		} else {
			b = false;
		}

		if (b && cnt == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() char s[] = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc boolean b = true; b true int cnt = 0; cnt 0 if (s[0] == 'A') {

			for (int i = 1; i < s.length; i++) {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			}

		} else {
			b = false;
		} s[0] == 'A' s[0] s 0 'A' {

			for (int i = 1; i < s.length; i++) {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			}

		} for (int i = 1; i < s.length; i++) {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			} int i = 1; int i = 1; i 1 i < s.length i s.length s s.length i++ i++ i {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			} {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			} if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				} s[i] >= 'a' && s[i] <= 'z' s[i] >= 'a' s[i] s i 'a' s[i] <= 'z' s[i] s i 'z' {
				} if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				} s[i] == 'C' && i != s.length - 1 && i != 1 s[i] == 'C' && i != s.length - 1 && i != 1 s[i] == 'C' s[i] s i 'C' i != s.length - 1 i s.length - 1 s.length s s.length 1 i != 1 i 1 {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} cnt++ cnt if (cnt > 1) {
						b = false;
						break;
					} cnt > 1 cnt 1 {
						b = false;
						break;
					} b = false b false break; {
					b = false;
					break;
				} b = false b false break; {
			b = false;
		} b = false b false if (b && cnt == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		} b && cnt == 1 b cnt == 1 cnt 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);
		StringBuilder sb = new StringBuilder();
		char s[] = sc.next().toCharArray();
		boolean b = true;
		int cnt = 0;
		if (s[0] == 'A') {

			for (int i = 1; i < s.length; i++) {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			}

		} else {
			b = false;
		}

		if (b && cnt == 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);
		StringBuilder sb = new StringBuilder();
		char s[] = sc.next().toCharArray();
		boolean b = true;
		int cnt = 0;
		if (s[0] == 'A') {

			for (int i = 1; i < s.length; i++) {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			}

		} else {
			b = false;
		}

		if (b && cnt == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		char s[] = sc.next().toCharArray();
		boolean b = true;
		int cnt = 0;
		if (s[0] == 'A') {

			for (int i = 1; i < s.length; i++) {
				if (s[i] >= 'a' && s[i] <= 'z') {
				} else if (s[i] == 'C' && i != s.length - 1 && i != 1) {
					cnt++;
					if (cnt > 1) {
						b = false;
						break;
					}
				} else {
					b = false;
					break;
				}
			}

		} else {
			b = false;
		}

		if (b && cnt == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
}
