import java.util.Scanner;

public class Main {	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = false;
		if (c[0] != 'A' ||Character.isUpperCase(s.charAt(s.length()-1)) || Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			return;
		}
		int U = 0;
		for (int i = 2; i < s.length()-1; i++) {
			if (Character.isUpperCase(s.charAt(i))) {
				U++;
			}
			if (c[i] == 'C') f = true;
		}
		if (U == 1 && f == true) {
			System.out.println("AC");
		} 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 s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = false;
		if (c[0] != 'A' ||Character.isUpperCase(s.charAt(s.length()-1)) || Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			return;
		}
		int U = 0;
		for (int i = 2; i < s.length()-1; i++) {
			if (Character.isUpperCase(s.charAt(i))) {
				U++;
			}
			if (c[i] == 'C') f = true;
		}
		if (U == 1 && f == true) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = false;
		if (c[0] != 'A' ||Character.isUpperCase(s.charAt(s.length()-1)) || Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			return;
		}
		int U = 0;
		for (int i = 2; i < s.length()-1; i++) {
			if (Character.isUpperCase(s.charAt(i))) {
				U++;
			}
			if (c[i] == 'C') f = true;
		}
		if (U == 1 && f == true) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	} main {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = false;
		if (c[0] != 'A' ||Character.isUpperCase(s.charAt(s.length()-1)) || Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			return;
		}
		int U = 0;
		for (int i = 2; i < s.length()-1; i++) {
			if (Character.isUpperCase(s.charAt(i))) {
				U++;
			}
			if (c[i] == 'C') f = true;
		}
		if (U == 1 && f == true) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan char[] c = new char[s.length()]; c new char[s.length()] s.length() s.length s for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			c[i] = s.charAt(i);
		} {
			c[i] = s.charAt(i);
		} c[i] = s.charAt(i) c[i] c i s.charAt(i) s.charAt s i boolean f = false; f false if (c[0] != 'A' ||Character.isUpperCase(s.charAt(s.length()-1)) || Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			return;
		} c[0] != 'A' ||Character.isUpperCase(s.charAt(s.length()-1)) || Character.isUpperCase(s.charAt(1)) c[0] != 'A' ||Character.isUpperCase(s.charAt(s.length()-1)) || Character.isUpperCase(s.charAt(1)) c[0] != 'A' c[0] c 0 'A' Character.isUpperCase(s.charAt(s.length()-1)) Character.isUpperCase Character s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 Character.isUpperCase(s.charAt(1)) Character.isUpperCase Character s.charAt(1) s.charAt s 1 {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; int U = 0; U 0 for (int i = 2; i < s.length()-1; i++) {
			if (Character.isUpperCase(s.charAt(i))) {
				U++;
			}
			if (c[i] == 'C') f = true;
		} 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 (Character.isUpperCase(s.charAt(i))) {
				U++;
			}
			if (c[i] == 'C') f = true;
		} {
			if (Character.isUpperCase(s.charAt(i))) {
				U++;
			}
			if (c[i] == 'C') f = true;
		} if (Character.isUpperCase(s.charAt(i))) {
				U++;
			} Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
				U++;
			} U++ U if (c[i] == 'C') f = true; c[i] == 'C' c[i] c i 'C' f = true f true if (U == 1 && f == true) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		} U == 1 && f == true U == 1 U 1 f == true f true {
			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" String[] args args public class Main {	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = false;
		if (c[0] != 'A' ||Character.isUpperCase(s.charAt(s.length()-1)) || Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			return;
		}
		int U = 0;
		for (int i = 2; i < s.length()-1; i++) {
			if (Character.isUpperCase(s.charAt(i))) {
				U++;
			}
			if (c[i] == 'C') f = true;
		}
		if (U == 1 && f == true) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
} public class Main {	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = false;
		if (c[0] != 'A' ||Character.isUpperCase(s.charAt(s.length()-1)) || Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			return;
		}
		int U = 0;
		for (int i = 2; i < s.length()-1; i++) {
			if (Character.isUpperCase(s.charAt(i))) {
				U++;
			}
			if (c[i] == 'C') f = true;
		}
		if (U == 1 && f == true) {
			System.out.println("AC");
		} 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 s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = false;
		if (c[0] != 'A' ||Character.isUpperCase(s.charAt(s.length()-1)) || Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			return;
		}
		int U = 0;
		for (int i = 2; i < s.length()-1; i++) {
			if (Character.isUpperCase(s.charAt(i))) {
				U++;
			}
			if (c[i] == 'C') f = true;
		}
		if (U == 1 && f == true) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
}
