import java.io.*;
import java.util.*;


public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		char[] s = sc.next().toCharArray();

		if (s[0] != 'A') {
			pr.println("WA");
		} else {
			int cnt = 0;
			for (int i = 2; i < s.length - 1; i++) {
				if (s[i] == 'C') {
					cnt++;
				}
			}

			if (cnt != 1) {
				pr.println("WA");
			} else {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			}
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	}

	static String INPUT = null;

	private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		char[] s = sc.next().toCharArray();

		if (s[0] != 'A') {
			pr.println("WA");
		} else {
			int cnt = 0;
			for (int i = 2; i < s.length - 1; i++) {
				if (s[i] == 'C') {
					cnt++;
				}
			}

			if (cnt != 1) {
				pr.println("WA");
			} else {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			}
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	}

	static String INPUT = null;

	private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} Main private static Scanner sc; sc private static Printer pr; pr static String INPUT = null; INPUT null private static void solve() {
		char[] s = sc.next().toCharArray();

		if (s[0] != 'A') {
			pr.println("WA");
		} else {
			int cnt = 0;
			for (int i = 2; i < s.length - 1; i++) {
				if (s[i] == 'C') {
					cnt++;
				}
			}

			if (cnt != 1) {
				pr.println("WA");
			} else {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			}
		}
	} solve {
		char[] s = sc.next().toCharArray();

		if (s[0] != 'A') {
			pr.println("WA");
		} else {
			int cnt = 0;
			for (int i = 2; i < s.length - 1; i++) {
				if (s[i] == 'C') {
					cnt++;
				}
			}

			if (cnt != 1) {
				pr.println("WA");
			} else {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			}
		}
	} char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc if (s[0] != 'A') {
			pr.println("WA");
		} else {
			int cnt = 0;
			for (int i = 2; i < s.length - 1; i++) {
				if (s[i] == 'C') {
					cnt++;
				}
			}

			if (cnt != 1) {
				pr.println("WA");
			} else {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			}
		} s[0] != 'A' s[0] s 0 'A' {
			pr.println("WA");
		} pr.println("WA") pr.println pr "WA" {
			int cnt = 0;
			for (int i = 2; i < s.length - 1; i++) {
				if (s[i] == 'C') {
					cnt++;
				}
			}

			if (cnt != 1) {
				pr.println("WA");
			} else {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			}
		} int cnt = 0; cnt 0 for (int i = 2; i < s.length - 1; i++) {
				if (s[i] == 'C') {
					cnt++;
				}
			} 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') {
					cnt++;
				}
			} {
				if (s[i] == 'C') {
					cnt++;
				}
			} if (s[i] == 'C') {
					cnt++;
				} s[i] == 'C' s[i] s i 'C' {
					cnt++;
				} cnt++ cnt if (cnt != 1) {
				pr.println("WA");
			} else {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			} cnt != 1 cnt 1 {
				pr.println("WA");
			} pr.println("WA") pr.println pr "WA" {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			} int cp = 0; cp 0 for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				} char c s {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				} {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				} if (c >= 'A' && c <= 'Z') {
						cp++;
					} c >= 'A' && c <= 'Z' c >= 'A' c 'A' c <= 'Z' c 'Z' {
						cp++;
					} cp++ cp if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				} cp != 2 cp 2 {
					pr.println("WA");
				} pr.println("WA") pr.println pr "WA" {
					pr.println("AC");
				} pr.println("AC") pr.println pr "AC" // ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	} main {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	} sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes())) sc new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes())) pr = new Printer(System.out) pr new Printer(System.out) solve() solve pr.flush() pr.flush pr String[] args args private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	} Printer Printer(OutputStream out) {
			super(out);
		} Printer {
			super(out);
		} super(out) super out OutputStream out out PrintWriter public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		char[] s = sc.next().toCharArray();

		if (s[0] != 'A') {
			pr.println("WA");
		} else {
			int cnt = 0;
			for (int i = 2; i < s.length - 1; i++) {
				if (s[i] == 'C') {
					cnt++;
				}
			}

			if (cnt != 1) {
				pr.println("WA");
			} else {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			}
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	}

	static String INPUT = null;

	private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		char[] s = sc.next().toCharArray();

		if (s[0] != 'A') {
			pr.println("WA");
		} else {
			int cnt = 0;
			for (int i = 2; i < s.length - 1; i++) {
				if (s[i] == 'C') {
					cnt++;
				}
			}

			if (cnt != 1) {
				pr.println("WA");
			} else {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			}
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	}

	static String INPUT = null;

	private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} Main
import java.io.*;
import java.util.*;


public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		char[] s = sc.next().toCharArray();

		if (s[0] != 'A') {
			pr.println("WA");
		} else {
			int cnt = 0;
			for (int i = 2; i < s.length - 1; i++) {
				if (s[i] == 'C') {
					cnt++;
				}
			}

			if (cnt != 1) {
				pr.println("WA");
			} else {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			}
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	}

	static String INPUT = null;

	private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
