import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

	/**
	 * AcCepted
	 * @param 4 ≤ |S| ≤ 10

	 */
	public static void main(String... args) {
		try (Scanner sc = new Scanner(System.in)) {
			String s = sc.next();
			List<String> list = Arrays.asList(s.split(""));
			String ans = "AC";

			if (list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C")) {
				int count = 0;
				for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				}
				if (count > 2) {
					ans = "WA";
				}
			} else {
				ans = "WA";
			}
			System.out.print(ans);
		}
	}
} import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	/**
	 * AcCepted
	 * @param 4 ≤ |S| ≤ 10

	 */
	public static void main(String... args) {
		try (Scanner sc = new Scanner(System.in)) {
			String s = sc.next();
			List<String> list = Arrays.asList(s.split(""));
			String ans = "AC";

			if (list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C")) {
				int count = 0;
				for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				}
				if (count > 2) {
					ans = "WA";
				}
			} else {
				ans = "WA";
			}
			System.out.print(ans);
		}
	}
} Main /**
	 * AcCepted
	 * @param 4 ≤ |S| ≤ 10

	 */
	public static void main(String... args) {
		try (Scanner sc = new Scanner(System.in)) {
			String s = sc.next();
			List<String> list = Arrays.asList(s.split(""));
			String ans = "AC";

			if (list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C")) {
				int count = 0;
				for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				}
				if (count > 2) {
					ans = "WA";
				}
			} else {
				ans = "WA";
			}
			System.out.print(ans);
		}
	} main {
		try (Scanner sc = new Scanner(System.in)) {
			String s = sc.next();
			List<String> list = Arrays.asList(s.split(""));
			String ans = "AC";

			if (list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C")) {
				int count = 0;
				for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				}
				if (count > 2) {
					ans = "WA";
				}
			} else {
				ans = "WA";
			}
			System.out.print(ans);
		}
	} try (Scanner sc = new Scanner(System.in)) {
			String s = sc.next();
			List<String> list = Arrays.asList(s.split(""));
			String ans = "AC";

			if (list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C")) {
				int count = 0;
				for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				}
				if (count > 2) {
					ans = "WA";
				}
			} else {
				ans = "WA";
			}
			System.out.print(ans);
		} {
			String s = sc.next();
			List<String> list = Arrays.asList(s.split(""));
			String ans = "AC";

			if (list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C")) {
				int count = 0;
				for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				}
				if (count > 2) {
					ans = "WA";
				}
			} else {
				ans = "WA";
			}
			System.out.print(ans);
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc List<String> list = Arrays.asList(s.split("")); list Arrays.asList(s.split("")) Arrays.asList Arrays s.split("") s.split s "" String ans = "AC"; ans "AC" if (list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C")) {
				int count = 0;
				for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				}
				if (count > 2) {
					ans = "WA";
				}
			} else {
				ans = "WA";
			} list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C") !list.get(1).equals("C") list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C") list.get(0).equals("A") list.get(0).equals list.get(0) list.get list 0 "A" list.contains("C") list.contains list "C" !list.get(1).equals("C") list.get(1).equals("C") list.get(1).equals list.get(1) list.get list 1 "C" !list.get(list.size() - 1).equals("C") list.get(list.size() - 1).equals("C") list.get(list.size() - 1).equals list.get(list.size() - 1) list.get list list.size() - 1 list.size() list.size list 1 "C" {
				int count = 0;
				for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				}
				if (count > 2) {
					ans = "WA";
				}
			} int count = 0; count 0 for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				} String t list {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				} {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				} if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					} Character.isUpperCase(t.charAt(0)) Character.isUpperCase Character t.charAt(0) t.charAt t 0 {
						count ++;
					} count ++ count if (count > 2) {
					ans = "WA";
				} count > 2 count 2 {
					ans = "WA";
				} ans = "WA" ans "WA" {
				ans = "WA";
			} ans = "WA" ans "WA" System.out.print(ans) System.out.print System.out System System.out ans String... args args public class Main {

	/**
	 * AcCepted
	 * @param 4 ≤ |S| ≤ 10

	 */
	public static void main(String... args) {
		try (Scanner sc = new Scanner(System.in)) {
			String s = sc.next();
			List<String> list = Arrays.asList(s.split(""));
			String ans = "AC";

			if (list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C")) {
				int count = 0;
				for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				}
				if (count > 2) {
					ans = "WA";
				}
			} else {
				ans = "WA";
			}
			System.out.print(ans);
		}
	}
} public class Main {

	/**
	 * AcCepted
	 * @param 4 ≤ |S| ≤ 10

	 */
	public static void main(String... args) {
		try (Scanner sc = new Scanner(System.in)) {
			String s = sc.next();
			List<String> list = Arrays.asList(s.split(""));
			String ans = "AC";

			if (list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C")) {
				int count = 0;
				for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				}
				if (count > 2) {
					ans = "WA";
				}
			} else {
				ans = "WA";
			}
			System.out.print(ans);
		}
	}
} Main
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

	/**
	 * AcCepted
	 * @param 4 ≤ |S| ≤ 10

	 */
	public static void main(String... args) {
		try (Scanner sc = new Scanner(System.in)) {
			String s = sc.next();
			List<String> list = Arrays.asList(s.split(""));
			String ans = "AC";

			if (list.get(0).equals("A")
					&& list.contains("C")
					&& !list.get(1).equals("C")
					&& !list.get(list.size() - 1).equals("C")) {
				int count = 0;
				for (String t : list) {
					if (Character.isUpperCase(t.charAt(0))) {
						count ++;
					}
				}
				if (count > 2) {
					ans = "WA";
				}
			} else {
				ans = "WA";
			}
			System.out.print(ans);
		}
	}
}