import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		boolean startsFromA = (S.charAt(0) == 'A');
		String seekC = S.substring(2, S.length() - 1);
		int indexOfC = seekC.indexOf('C');
		boolean containsSingleC = (indexOfC != -1 && seekC.indexOf('C', indexOfC + 1) == -1);
		boolean lowersOtherThanAC = isLowersOtherThanAC(S, indexOfC + 2);
		System.out.println((startsFromA && containsSingleC && lowersOtherThanAC) ? "AC" : "WA");
	}

	private static boolean isLowersOtherThanAC(String S, int indexOfC) {
		char[] array = S.toCharArray();
		int length = array.length;
		for (int i = 1; i < length; i++) {
			if (i != indexOfC && Character.isUpperCase(array[i])) {
				return false;
			}
		}
		return true;
	}
} 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();

		boolean startsFromA = (S.charAt(0) == 'A');
		String seekC = S.substring(2, S.length() - 1);
		int indexOfC = seekC.indexOf('C');
		boolean containsSingleC = (indexOfC != -1 && seekC.indexOf('C', indexOfC + 1) == -1);
		boolean lowersOtherThanAC = isLowersOtherThanAC(S, indexOfC + 2);
		System.out.println((startsFromA && containsSingleC && lowersOtherThanAC) ? "AC" : "WA");
	}

	private static boolean isLowersOtherThanAC(String S, int indexOfC) {
		char[] array = S.toCharArray();
		int length = array.length;
		for (int i = 1; i < length; i++) {
			if (i != indexOfC && Character.isUpperCase(array[i])) {
				return false;
			}
		}
		return true;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		boolean startsFromA = (S.charAt(0) == 'A');
		String seekC = S.substring(2, S.length() - 1);
		int indexOfC = seekC.indexOf('C');
		boolean containsSingleC = (indexOfC != -1 && seekC.indexOf('C', indexOfC + 1) == -1);
		boolean lowersOtherThanAC = isLowersOtherThanAC(S, indexOfC + 2);
		System.out.println((startsFromA && containsSingleC && lowersOtherThanAC) ? "AC" : "WA");
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		boolean startsFromA = (S.charAt(0) == 'A');
		String seekC = S.substring(2, S.length() - 1);
		int indexOfC = seekC.indexOf('C');
		boolean containsSingleC = (indexOfC != -1 && seekC.indexOf('C', indexOfC + 1) == -1);
		boolean lowersOtherThanAC = isLowersOtherThanAC(S, indexOfC + 2);
		System.out.println((startsFromA && containsSingleC && lowersOtherThanAC) ? "AC" : "WA");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc boolean startsFromA = (S.charAt(0) == 'A'); startsFromA (S.charAt(0) == 'A') S.charAt(0) S.charAt S 0 'A' String seekC = S.substring(2, S.length() - 1); seekC S.substring(2, S.length() - 1) S.substring S 2 S.length() - 1 S.length() S.length S 1 int indexOfC = seekC.indexOf('C'); indexOfC seekC.indexOf('C') seekC.indexOf seekC 'C' boolean containsSingleC = (indexOfC != -1 && seekC.indexOf('C', indexOfC + 1) == -1); containsSingleC (indexOfC != -1 && seekC.indexOf('C', indexOfC + 1) == -1) indexOfC != -1 indexOfC -1 1 seekC.indexOf('C', indexOfC + 1) == -1 seekC.indexOf('C', indexOfC + 1) seekC.indexOf seekC 'C' indexOfC + 1 indexOfC 1 -1 1 boolean lowersOtherThanAC = isLowersOtherThanAC(S, indexOfC + 2); lowersOtherThanAC isLowersOtherThanAC(S, indexOfC + 2) isLowersOtherThanAC S indexOfC + 2 indexOfC 2 System.out.println((startsFromA && containsSingleC && lowersOtherThanAC) ? "AC" : "WA") System.out.println System.out System System.out (startsFromA && containsSingleC && lowersOtherThanAC) ? "AC" : "WA" (startsFromA && containsSingleC && lowersOtherThanAC) startsFromA && containsSingleC && lowersOtherThanAC startsFromA containsSingleC lowersOtherThanAC "AC" "WA" String[] args args private static boolean isLowersOtherThanAC(String S, int indexOfC) {
		char[] array = S.toCharArray();
		int length = array.length;
		for (int i = 1; i < length; i++) {
			if (i != indexOfC && Character.isUpperCase(array[i])) {
				return false;
			}
		}
		return true;
	} isLowersOtherThanAC {
		char[] array = S.toCharArray();
		int length = array.length;
		for (int i = 1; i < length; i++) {
			if (i != indexOfC && Character.isUpperCase(array[i])) {
				return false;
			}
		}
		return true;
	} char[] array = S.toCharArray(); array S.toCharArray() S.toCharArray S int length = array.length; length array.length array array.length for (int i = 1; i < length; i++) {
			if (i != indexOfC && Character.isUpperCase(array[i])) {
				return false;
			}
		} int i = 1; int i = 1; i 1 i < length i length i++ i++ i {
			if (i != indexOfC && Character.isUpperCase(array[i])) {
				return false;
			}
		} {
			if (i != indexOfC && Character.isUpperCase(array[i])) {
				return false;
			}
		} if (i != indexOfC && Character.isUpperCase(array[i])) {
				return false;
			} i != indexOfC && Character.isUpperCase(array[i]) i != indexOfC i indexOfC Character.isUpperCase(array[i]) Character.isUpperCase Character array[i] array i {
				return false;
			} return false; false return true; true String S S int indexOfC indexOfC public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		boolean startsFromA = (S.charAt(0) == 'A');
		String seekC = S.substring(2, S.length() - 1);
		int indexOfC = seekC.indexOf('C');
		boolean containsSingleC = (indexOfC != -1 && seekC.indexOf('C', indexOfC + 1) == -1);
		boolean lowersOtherThanAC = isLowersOtherThanAC(S, indexOfC + 2);
		System.out.println((startsFromA && containsSingleC && lowersOtherThanAC) ? "AC" : "WA");
	}

	private static boolean isLowersOtherThanAC(String S, int indexOfC) {
		char[] array = S.toCharArray();
		int length = array.length;
		for (int i = 1; i < length; i++) {
			if (i != indexOfC && Character.isUpperCase(array[i])) {
				return false;
			}
		}
		return true;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		boolean startsFromA = (S.charAt(0) == 'A');
		String seekC = S.substring(2, S.length() - 1);
		int indexOfC = seekC.indexOf('C');
		boolean containsSingleC = (indexOfC != -1 && seekC.indexOf('C', indexOfC + 1) == -1);
		boolean lowersOtherThanAC = isLowersOtherThanAC(S, indexOfC + 2);
		System.out.println((startsFromA && containsSingleC && lowersOtherThanAC) ? "AC" : "WA");
	}

	private static boolean isLowersOtherThanAC(String S, int indexOfC) {
		char[] array = S.toCharArray();
		int length = array.length;
		for (int i = 1; i < length; i++) {
			if (i != indexOfC && Character.isUpperCase(array[i])) {
				return false;
			}
		}
		return true;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		boolean startsFromA = (S.charAt(0) == 'A');
		String seekC = S.substring(2, S.length() - 1);
		int indexOfC = seekC.indexOf('C');
		boolean containsSingleC = (indexOfC != -1 && seekC.indexOf('C', indexOfC + 1) == -1);
		boolean lowersOtherThanAC = isLowersOtherThanAC(S, indexOfC + 2);
		System.out.println((startsFromA && containsSingleC && lowersOtherThanAC) ? "AC" : "WA");
	}

	private static boolean isLowersOtherThanAC(String S, int indexOfC) {
		char[] array = S.toCharArray();
		int length = array.length;
		for (int i = 1; i < length; i++) {
			if (i != indexOfC && Character.isUpperCase(array[i])) {
				return false;
			}
		}
		return true;
	}
}