import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();

		char[] charArray = new char[str.length()];
		for (int i = 0; i < str.length(); i++) {
			charArray[i] = str.charAt(i);
		}
		if (charArray[0] != 65) {
			System.out.println("WA");
		} else if (Character.isUpperCase(charArray[1])) {
			System.out.println("WA");

		} else {
			int count = 0;
			for (int i = 2; i < str.length() - 1; i++) {
				if (charArray[i] == 67) {
					count++;
				}
			}
			if (count == 1) {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} else {
				System.out.println("WA");
			}

		}

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();

		char[] charArray = new char[str.length()];
		for (int i = 0; i < str.length(); i++) {
			charArray[i] = str.charAt(i);
		}
		if (charArray[0] != 65) {
			System.out.println("WA");
		} else if (Character.isUpperCase(charArray[1])) {
			System.out.println("WA");

		} else {
			int count = 0;
			for (int i = 2; i < str.length() - 1; i++) {
				if (charArray[i] == 67) {
					count++;
				}
			}
			if (count == 1) {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} else {
				System.out.println("WA");
			}

		}

	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();

		char[] charArray = new char[str.length()];
		for (int i = 0; i < str.length(); i++) {
			charArray[i] = str.charAt(i);
		}
		if (charArray[0] != 65) {
			System.out.println("WA");
		} else if (Character.isUpperCase(charArray[1])) {
			System.out.println("WA");

		} else {
			int count = 0;
			for (int i = 2; i < str.length() - 1; i++) {
				if (charArray[i] == 67) {
					count++;
				}
			}
			if (count == 1) {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} else {
				System.out.println("WA");
			}

		}

	} main {

		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();

		char[] charArray = new char[str.length()];
		for (int i = 0; i < str.length(); i++) {
			charArray[i] = str.charAt(i);
		}
		if (charArray[0] != 65) {
			System.out.println("WA");
		} else if (Character.isUpperCase(charArray[1])) {
			System.out.println("WA");

		} else {
			int count = 0;
			for (int i = 2; i < str.length() - 1; i++) {
				if (charArray[i] == 67) {
					count++;
				}
			}
			if (count == 1) {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} else {
				System.out.println("WA");
			}

		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan char[] charArray = new char[str.length()]; charArray new char[str.length()] str.length() str.length str for (int i = 0; i < str.length(); i++) {
			charArray[i] = str.charAt(i);
		} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
			charArray[i] = str.charAt(i);
		} {
			charArray[i] = str.charAt(i);
		} charArray[i] = str.charAt(i) charArray[i] charArray i str.charAt(i) str.charAt str i if (charArray[0] != 65) {
			System.out.println("WA");
		} else if (Character.isUpperCase(charArray[1])) {
			System.out.println("WA");

		} else {
			int count = 0;
			for (int i = 2; i < str.length() - 1; i++) {
				if (charArray[i] == 67) {
					count++;
				}
			}
			if (count == 1) {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} else {
				System.out.println("WA");
			}

		} charArray[0] != 65 charArray[0] charArray 0 65 {
			System.out.println("WA");
		} System.out.println("WA") System.out.println System.out System System.out "WA" if (Character.isUpperCase(charArray[1])) {
			System.out.println("WA");

		} else {
			int count = 0;
			for (int i = 2; i < str.length() - 1; i++) {
				if (charArray[i] == 67) {
					count++;
				}
			}
			if (count == 1) {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} else {
				System.out.println("WA");
			}

		} Character.isUpperCase(charArray[1]) Character.isUpperCase Character charArray[1] charArray 1 {
			System.out.println("WA");

		} System.out.println("WA") System.out.println System.out System System.out "WA" {
			int count = 0;
			for (int i = 2; i < str.length() - 1; i++) {
				if (charArray[i] == 67) {
					count++;
				}
			}
			if (count == 1) {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} else {
				System.out.println("WA");
			}

		} int count = 0; count 0 for (int i = 2; i < str.length() - 1; i++) {
				if (charArray[i] == 67) {
					count++;
				}
			} int i = 2; int i = 2; i 2 i < str.length() - 1 i str.length() - 1 str.length() str.length str 1 i++ i++ i {
				if (charArray[i] == 67) {
					count++;
				}
			} {
				if (charArray[i] == 67) {
					count++;
				}
			} if (charArray[i] == 67) {
					count++;
				} charArray[i] == 67 charArray[i] charArray i 67 {
					count++;
				} count++ count if (count == 1) {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} else {
				System.out.println("WA");
			} count == 1 count 1 {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				} charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1]) charArray[str.length() - 1] != 67 charArray[str.length() - 1] charArray str.length() - 1 str.length() str.length str 1 67 Character.isLowerCase(charArray[str.length() - 1]) Character.isLowerCase Character charArray[str.length() - 1] charArray str.length() - 1 str.length() str.length str 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" {
				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 scan = new Scanner(System.in);
		String str = scan.nextLine();

		char[] charArray = new char[str.length()];
		for (int i = 0; i < str.length(); i++) {
			charArray[i] = str.charAt(i);
		}
		if (charArray[0] != 65) {
			System.out.println("WA");
		} else if (Character.isUpperCase(charArray[1])) {
			System.out.println("WA");

		} else {
			int count = 0;
			for (int i = 2; i < str.length() - 1; i++) {
				if (charArray[i] == 67) {
					count++;
				}
			}
			if (count == 1) {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} else {
				System.out.println("WA");
			}

		}

	}
} public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();

		char[] charArray = new char[str.length()];
		for (int i = 0; i < str.length(); i++) {
			charArray[i] = str.charAt(i);
		}
		if (charArray[0] != 65) {
			System.out.println("WA");
		} else if (Character.isUpperCase(charArray[1])) {
			System.out.println("WA");

		} else {
			int count = 0;
			for (int i = 2; i < str.length() - 1; i++) {
				if (charArray[i] == 67) {
					count++;
				}
			}
			if (count == 1) {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} else {
				System.out.println("WA");
			}

		}

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();

		char[] charArray = new char[str.length()];
		for (int i = 0; i < str.length(); i++) {
			charArray[i] = str.charAt(i);
		}
		if (charArray[0] != 65) {
			System.out.println("WA");
		} else if (Character.isUpperCase(charArray[1])) {
			System.out.println("WA");

		} else {
			int count = 0;
			for (int i = 2; i < str.length() - 1; i++) {
				if (charArray[i] == 67) {
					count++;
				}
			}
			if (count == 1) {
				if (charArray[str.length() - 1] != 67 && Character.isLowerCase(charArray[str.length() - 1])) {
					System.out.println("AC");
				} else {
					System.out.println("WA");
				}
			} else {
				System.out.println("WA");
			}

		}

	}
}