import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if("A".equals(S.substring(0,1))) {
			S = S.substring(1);
			if(S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C")) {
				S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1);
				String s = S.toLowerCase();
				if(S.equals(s)) {
					result = "AC";
				}
			}
		}
		System.out.println(result);
	}
} 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();
		String result = "WA";
		if("A".equals(S.substring(0,1))) {
			S = S.substring(1);
			if(S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C")) {
				S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1);
				String s = S.toLowerCase();
				if(S.equals(s)) {
					result = "AC";
				}
			}
		}
		System.out.println(result);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if("A".equals(S.substring(0,1))) {
			S = S.substring(1);
			if(S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C")) {
				S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1);
				String s = S.toLowerCase();
				if(S.equals(s)) {
					result = "AC";
				}
			}
		}
		System.out.println(result);
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if("A".equals(S.substring(0,1))) {
			S = S.substring(1);
			if(S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C")) {
				S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1);
				String s = S.toLowerCase();
				if(S.equals(s)) {
					result = "AC";
				}
			}
		}
		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String result = "WA"; result "WA" if("A".equals(S.substring(0,1))) {
			S = S.substring(1);
			if(S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C")) {
				S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1);
				String s = S.toLowerCase();
				if(S.equals(s)) {
					result = "AC";
				}
			}
		} "A".equals(S.substring(0,1)) "A".equals "A" S.substring(0,1) S.substring S 0 1 {
			S = S.substring(1);
			if(S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C")) {
				S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1);
				String s = S.toLowerCase();
				if(S.equals(s)) {
					result = "AC";
				}
			}
		} S = S.substring(1) S S.substring(1) S.substring S 1 if(S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C")) {
				S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1);
				String s = S.toLowerCase();
				if(S.equals(s)) {
					result = "AC";
				}
			} S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C") S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C") S.indexOf("C") > 0 S.indexOf("C") S.indexOf S "C" 0 S.indexOf("C") < S.length()-1 S.indexOf("C") S.indexOf S "C" S.length()-1 S.length() S.length S 1 S.indexOf("C") == S.lastIndexOf("C") S.indexOf("C") S.indexOf S "C" S.lastIndexOf("C") S.lastIndexOf S "C" {
				S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1);
				String s = S.toLowerCase();
				if(S.equals(s)) {
					result = "AC";
				}
			} S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1) S S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1) S.substring(0,S.indexOf("C")) S.substring S 0 S.indexOf("C") S.indexOf S "C" S.substring(S.indexOf("C")+1) S.substring S S.indexOf("C")+1 S.indexOf("C") S.indexOf S "C" 1 String s = S.toLowerCase(); s S.toLowerCase() S.toLowerCase S if(S.equals(s)) {
					result = "AC";
				} S.equals(s) S.equals S s {
					result = "AC";
				} result = "AC" result "AC" System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if("A".equals(S.substring(0,1))) {
			S = S.substring(1);
			if(S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C")) {
				S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1);
				String s = S.toLowerCase();
				if(S.equals(s)) {
					result = "AC";
				}
			}
		}
		System.out.println(result);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if("A".equals(S.substring(0,1))) {
			S = S.substring(1);
			if(S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C")) {
				S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1);
				String s = S.toLowerCase();
				if(S.equals(s)) {
					result = "AC";
				}
			}
		}
		System.out.println(result);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String result = "WA";
		if("A".equals(S.substring(0,1))) {
			S = S.substring(1);
			if(S.indexOf("C") > 0  && S.indexOf("C") < S.length()-1
					&& S.indexOf("C") == S.lastIndexOf("C")) {
				S = S.substring(0,S.indexOf("C")) + S.substring(S.indexOf("C")+1);
				String s = S.toLowerCase();
				if(S.equals(s)) {
					result = "AC";
				}
			}
		}
		System.out.println(result);
	}
}
