import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		String sub = s.substring(2,s.length()-1);

		if (s.startsWith("A") && sub.contains("C") && sub.indexOf('C')==sub.lastIndexOf('C')){
			int idxC = sub.indexOf('C')+2;
			for (int i=1;i<s.length(); i++){
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			}
			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 scanner = new Scanner(System.in);
		String s = scanner.next();
		String sub = s.substring(2,s.length()-1);

		if (s.startsWith("A") && sub.contains("C") && sub.indexOf('C')==sub.lastIndexOf('C')){
			int idxC = sub.indexOf('C')+2;
			for (int i=1;i<s.length(); i++){
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			}
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		String sub = s.substring(2,s.length()-1);

		if (s.startsWith("A") && sub.contains("C") && sub.indexOf('C')==sub.lastIndexOf('C')){
			int idxC = sub.indexOf('C')+2;
			for (int i=1;i<s.length(); i++){
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			}
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		String sub = s.substring(2,s.length()-1);

		if (s.startsWith("A") && sub.contains("C") && sub.indexOf('C')==sub.lastIndexOf('C')){
			int idxC = sub.indexOf('C')+2;
			for (int i=1;i<s.length(); i++){
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			}
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.next(); s scanner.next() scanner.next scanner String sub = s.substring(2,s.length()-1); sub s.substring(2,s.length()-1) s.substring s 2 s.length()-1 s.length() s.length s 1 if (s.startsWith("A") && sub.contains("C") && sub.indexOf('C')==sub.lastIndexOf('C')){
			int idxC = sub.indexOf('C')+2;
			for (int i=1;i<s.length(); i++){
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			}
			System.out.println("AC");
		}else {
			System.out.println("WA");
		} s.startsWith("A") && sub.contains("C") && sub.indexOf('C')==sub.lastIndexOf('C') s.startsWith("A") && sub.contains("C") && sub.indexOf('C')==sub.lastIndexOf('C') s.startsWith("A") s.startsWith s "A" sub.contains("C") sub.contains sub "C" sub.indexOf('C')==sub.lastIndexOf('C') sub.indexOf('C') sub.indexOf sub 'C' sub.lastIndexOf('C') sub.lastIndexOf sub 'C' {
			int idxC = sub.indexOf('C')+2;
			for (int i=1;i<s.length(); i++){
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			}
			System.out.println("AC");
		} int idxC = sub.indexOf('C')+2; idxC sub.indexOf('C')+2 sub.indexOf('C') sub.indexOf sub 'C' 2 for (int i=1;i<s.length(); i++){
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			} int i=1; int i=1; i 1 i<s.length() i s.length() s.length s i++ i++ i {
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			} {
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			} if (i==idxC) continue; i==idxC i idxC continue; if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				} Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
					System.out.println("WA");
					System.exit(0);
				} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 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 scanner = new Scanner(System.in);
		String s = scanner.next();
		String sub = s.substring(2,s.length()-1);

		if (s.startsWith("A") && sub.contains("C") && sub.indexOf('C')==sub.lastIndexOf('C')){
			int idxC = sub.indexOf('C')+2;
			for (int i=1;i<s.length(); i++){
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			}
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		String sub = s.substring(2,s.length()-1);

		if (s.startsWith("A") && sub.contains("C") && sub.indexOf('C')==sub.lastIndexOf('C')){
			int idxC = sub.indexOf('C')+2;
			for (int i=1;i<s.length(); i++){
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			}
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		String sub = s.substring(2,s.length()-1);

		if (s.startsWith("A") && sub.contains("C") && sub.indexOf('C')==sub.lastIndexOf('C')){
			int idxC = sub.indexOf('C')+2;
			for (int i=1;i<s.length(); i++){
				if (i==idxC) continue;
				if (Character.isUpperCase(s.charAt(i))) {
					System.out.println("WA");
					System.exit(0);
				}
			}
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
}