import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		sc.close();

		char s[] = new char[S.length()];

		for (int i = 0; i < S.length(); i++) {
			s[i] = S.charAt(i);

			if (i == 0) {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			}

			if (i == S.length() - 1) {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			}
		}

		int countC = 0;
		int indexC = 0;

		for (int i = 2; i < S.length() - 1; i++) {
			if (s[i] == 'C') {
				countC++;
				indexC = i;
			}
		}

		if (countC != 1) {
			System.out.print("WA");
			return;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i == 0) {
				continue;
			}
			if (i == indexC) {
				continue;
			}

			if (Character.isUpperCase(s[i])) {
				System.out.print("WA");
				return;
			}
		}
		System.out.print("AC");
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		sc.close();

		char s[] = new char[S.length()];

		for (int i = 0; i < S.length(); i++) {
			s[i] = S.charAt(i);

			if (i == 0) {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			}

			if (i == S.length() - 1) {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			}
		}

		int countC = 0;
		int indexC = 0;

		for (int i = 2; i < S.length() - 1; i++) {
			if (s[i] == 'C') {
				countC++;
				indexC = i;
			}
		}

		if (countC != 1) {
			System.out.print("WA");
			return;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i == 0) {
				continue;
			}
			if (i == indexC) {
				continue;
			}

			if (Character.isUpperCase(s[i])) {
				System.out.print("WA");
				return;
			}
		}
		System.out.print("AC");
	}
} Main public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		sc.close();

		char s[] = new char[S.length()];

		for (int i = 0; i < S.length(); i++) {
			s[i] = S.charAt(i);

			if (i == 0) {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			}

			if (i == S.length() - 1) {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			}
		}

		int countC = 0;
		int indexC = 0;

		for (int i = 2; i < S.length() - 1; i++) {
			if (s[i] == 'C') {
				countC++;
				indexC = i;
			}
		}

		if (countC != 1) {
			System.out.print("WA");
			return;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i == 0) {
				continue;
			}
			if (i == indexC) {
				continue;
			}

			if (Character.isUpperCase(s[i])) {
				System.out.print("WA");
				return;
			}
		}
		System.out.print("AC");
	} main {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		sc.close();

		char s[] = new char[S.length()];

		for (int i = 0; i < S.length(); i++) {
			s[i] = S.charAt(i);

			if (i == 0) {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			}

			if (i == S.length() - 1) {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			}
		}

		int countC = 0;
		int indexC = 0;

		for (int i = 2; i < S.length() - 1; i++) {
			if (s[i] == 'C') {
				countC++;
				indexC = i;
			}
		}

		if (countC != 1) {
			System.out.print("WA");
			return;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i == 0) {
				continue;
			}
			if (i == indexC) {
				continue;
			}

			if (Character.isUpperCase(s[i])) {
				System.out.print("WA");
				return;
			}
		}
		System.out.print("AC");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc char s[] = new char[S.length()]; s new char[S.length()] S.length() S.length S for (int i = 0; i < S.length(); i++) {
			s[i] = S.charAt(i);

			if (i == 0) {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			}

			if (i == S.length() - 1) {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			}
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			s[i] = S.charAt(i);

			if (i == 0) {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			}

			if (i == S.length() - 1) {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			}
		} {
			s[i] = S.charAt(i);

			if (i == 0) {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			}

			if (i == S.length() - 1) {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			}
		} s[i] = S.charAt(i) s[i] s i S.charAt(i) S.charAt S i if (i == 0) {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			} i == 0 i 0 {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			} if (s[i] != 'A') {
					System.out.print("WA");
					return;
				} s[i] != 'A' s[i] s i 'A' {
					System.out.print("WA");
					return;
				} System.out.print("WA") System.out.print System.out System System.out "WA" return; if (i == S.length() - 1) {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			} i == S.length() - 1 i S.length() - 1 S.length() S.length S 1 {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			} if (s[i] == 'C') {
					System.out.print("WA");
					return;
				} s[i] == 'C' s[i] s i 'C' {
					System.out.print("WA");
					return;
				} System.out.print("WA") System.out.print System.out System System.out "WA" return; int countC = 0; countC 0 int indexC = 0; indexC 0 for (int i = 2; i < S.length() - 1; i++) {
			if (s[i] == 'C') {
				countC++;
				indexC = i;
			}
		} int i = 2; int i = 2; i 2 i < S.length() - 1 i S.length() - 1 S.length() S.length S 1 i++ i++ i {
			if (s[i] == 'C') {
				countC++;
				indexC = i;
			}
		} {
			if (s[i] == 'C') {
				countC++;
				indexC = i;
			}
		} if (s[i] == 'C') {
				countC++;
				indexC = i;
			} s[i] == 'C' s[i] s i 'C' {
				countC++;
				indexC = i;
			} countC++ countC indexC = i indexC i if (countC != 1) {
			System.out.print("WA");
			return;
		} countC != 1 countC 1 {
			System.out.print("WA");
			return;
		} System.out.print("WA") System.out.print System.out System System.out "WA" return; for (int i = 1; i < S.length(); i++) {
			if (i == 0) {
				continue;
			}
			if (i == indexC) {
				continue;
			}

			if (Character.isUpperCase(s[i])) {
				System.out.print("WA");
				return;
			}
		} int i = 1; int i = 1; i 1 i < S.length() i S.length() S.length S i++ i++ i {
			if (i == 0) {
				continue;
			}
			if (i == indexC) {
				continue;
			}

			if (Character.isUpperCase(s[i])) {
				System.out.print("WA");
				return;
			}
		} {
			if (i == 0) {
				continue;
			}
			if (i == indexC) {
				continue;
			}

			if (Character.isUpperCase(s[i])) {
				System.out.print("WA");
				return;
			}
		} if (i == 0) {
				continue;
			} i == 0 i 0 {
				continue;
			} continue; if (i == indexC) {
				continue;
			} i == indexC i indexC {
				continue;
			} continue; if (Character.isUpperCase(s[i])) {
				System.out.print("WA");
				return;
			} Character.isUpperCase(s[i]) Character.isUpperCase Character s[i] s i {
				System.out.print("WA");
				return;
			} System.out.print("WA") System.out.print System.out System System.out "WA" return; System.out.print("AC") System.out.print System.out System System.out "AC" String arg[] arg public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		sc.close();

		char s[] = new char[S.length()];

		for (int i = 0; i < S.length(); i++) {
			s[i] = S.charAt(i);

			if (i == 0) {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			}

			if (i == S.length() - 1) {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			}
		}

		int countC = 0;
		int indexC = 0;

		for (int i = 2; i < S.length() - 1; i++) {
			if (s[i] == 'C') {
				countC++;
				indexC = i;
			}
		}

		if (countC != 1) {
			System.out.print("WA");
			return;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i == 0) {
				continue;
			}
			if (i == indexC) {
				continue;
			}

			if (Character.isUpperCase(s[i])) {
				System.out.print("WA");
				return;
			}
		}
		System.out.print("AC");
	}
} public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		sc.close();

		char s[] = new char[S.length()];

		for (int i = 0; i < S.length(); i++) {
			s[i] = S.charAt(i);

			if (i == 0) {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			}

			if (i == S.length() - 1) {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			}
		}

		int countC = 0;
		int indexC = 0;

		for (int i = 2; i < S.length() - 1; i++) {
			if (s[i] == 'C') {
				countC++;
				indexC = i;
			}
		}

		if (countC != 1) {
			System.out.print("WA");
			return;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i == 0) {
				continue;
			}
			if (i == indexC) {
				continue;
			}

			if (Character.isUpperCase(s[i])) {
				System.out.print("WA");
				return;
			}
		}
		System.out.print("AC");
	}
} Main
import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		sc.close();

		char s[] = new char[S.length()];

		for (int i = 0; i < S.length(); i++) {
			s[i] = S.charAt(i);

			if (i == 0) {
				if (s[i] != 'A') {
					System.out.print("WA");
					return;
				}
			}

			if (i == S.length() - 1) {
				if (s[i] == 'C') {
					System.out.print("WA");
					return;
				}
			}
		}

		int countC = 0;
		int indexC = 0;

		for (int i = 2; i < S.length() - 1; i++) {
			if (s[i] == 'C') {
				countC++;
				indexC = i;
			}
		}

		if (countC != 1) {
			System.out.print("WA");
			return;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i == 0) {
				continue;
			}
			if (i == indexC) {
				continue;
			}

			if (Character.isUpperCase(s[i])) {
				System.out.print("WA");
				return;
			}
		}
		System.out.print("AC");
	}
}