import java.util.Scanner;

public class Main{
	static boolean check(String s) {
		if(s.charAt(0) != 'A') return false;
		if(s.substring(2, s.length() - 1).indexOf('C') != s.substring(2, s.length() - 1).lastIndexOf('C') || s.substring(2, s.length() - 1).indexOf('C') == -1) {
			return false;
		}
		char[] str = s.toCharArray();
		str[0] = 'a';
		str[s.substring(2, s.length() - 1).indexOf('C') + 2] = 'c';
		return String.valueOf(str).equals(s.toLowerCase());
	}
	static long mod = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(check(S)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main{
	static boolean check(String s) {
		if(s.charAt(0) != 'A') return false;
		if(s.substring(2, s.length() - 1).indexOf('C') != s.substring(2, s.length() - 1).lastIndexOf('C') || s.substring(2, s.length() - 1).indexOf('C') == -1) {
			return false;
		}
		char[] str = s.toCharArray();
		str[0] = 'a';
		str[s.substring(2, s.length() - 1).indexOf('C') + 2] = 'c';
		return String.valueOf(str).equals(s.toLowerCase());
	}
	static long mod = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(check(S)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
} Main static long mod = 1000000007; mod 1000000007 static boolean check(String s) {
		if(s.charAt(0) != 'A') return false;
		if(s.substring(2, s.length() - 1).indexOf('C') != s.substring(2, s.length() - 1).lastIndexOf('C') || s.substring(2, s.length() - 1).indexOf('C') == -1) {
			return false;
		}
		char[] str = s.toCharArray();
		str[0] = 'a';
		str[s.substring(2, s.length() - 1).indexOf('C') + 2] = 'c';
		return String.valueOf(str).equals(s.toLowerCase());
	} check {
		if(s.charAt(0) != 'A') return false;
		if(s.substring(2, s.length() - 1).indexOf('C') != s.substring(2, s.length() - 1).lastIndexOf('C') || s.substring(2, s.length() - 1).indexOf('C') == -1) {
			return false;
		}
		char[] str = s.toCharArray();
		str[0] = 'a';
		str[s.substring(2, s.length() - 1).indexOf('C') + 2] = 'c';
		return String.valueOf(str).equals(s.toLowerCase());
	} if(s.charAt(0) != 'A') return false; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' return false; false if(s.substring(2, s.length() - 1).indexOf('C') != s.substring(2, s.length() - 1).lastIndexOf('C') || s.substring(2, s.length() - 1).indexOf('C') == -1) {
			return false;
		} s.substring(2, s.length() - 1).indexOf('C') != s.substring(2, s.length() - 1).lastIndexOf('C') || s.substring(2, s.length() - 1).indexOf('C') == -1 s.substring(2, s.length() - 1).indexOf('C') != s.substring(2, s.length() - 1).lastIndexOf('C') s.substring(2, s.length() - 1).indexOf('C') s.substring(2, s.length() - 1).indexOf s.substring(2, s.length() - 1) s.substring s 2 s.length() - 1 s.length() s.length s 1 'C' s.substring(2, s.length() - 1).lastIndexOf('C') s.substring(2, s.length() - 1).lastIndexOf s.substring(2, s.length() - 1) s.substring s 2 s.length() - 1 s.length() s.length s 1 'C' s.substring(2, s.length() - 1).indexOf('C') == -1 s.substring(2, s.length() - 1).indexOf('C') s.substring(2, s.length() - 1).indexOf s.substring(2, s.length() - 1) s.substring s 2 s.length() - 1 s.length() s.length s 1 'C' -1 1 {
			return false;
		} return false; false char[] str = s.toCharArray(); str s.toCharArray() s.toCharArray s str[0] = 'a' str[0] str 0 'a' str[s.substring(2, s.length() - 1).indexOf('C') + 2] = 'c' str[s.substring(2, s.length() - 1).indexOf('C') + 2] str s.substring(2, s.length() - 1).indexOf('C') + 2 s.substring(2, s.length() - 1).indexOf('C') s.substring(2, s.length() - 1).indexOf s.substring(2, s.length() - 1) s.substring s 2 s.length() - 1 s.length() s.length s 1 'C' 2 'c' return String.valueOf(str).equals(s.toLowerCase()); String.valueOf(str).equals(s.toLowerCase()) String.valueOf(str).equals String.valueOf(str) String.valueOf String str s.toLowerCase() s.toLowerCase s String s s public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(check(S)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(check(S)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc if(check(S)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		} check(S) check S {
			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{
	static boolean check(String s) {
		if(s.charAt(0) != 'A') return false;
		if(s.substring(2, s.length() - 1).indexOf('C') != s.substring(2, s.length() - 1).lastIndexOf('C') || s.substring(2, s.length() - 1).indexOf('C') == -1) {
			return false;
		}
		char[] str = s.toCharArray();
		str[0] = 'a';
		str[s.substring(2, s.length() - 1).indexOf('C') + 2] = 'c';
		return String.valueOf(str).equals(s.toLowerCase());
	}
	static long mod = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(check(S)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
} public class Main{
	static boolean check(String s) {
		if(s.charAt(0) != 'A') return false;
		if(s.substring(2, s.length() - 1).indexOf('C') != s.substring(2, s.length() - 1).lastIndexOf('C') || s.substring(2, s.length() - 1).indexOf('C') == -1) {
			return false;
		}
		char[] str = s.toCharArray();
		str[0] = 'a';
		str[s.substring(2, s.length() - 1).indexOf('C') + 2] = 'c';
		return String.valueOf(str).equals(s.toLowerCase());
	}
	static long mod = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(check(S)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
} Main
import java.util.Scanner;

public class Main{
	static boolean check(String s) {
		if(s.charAt(0) != 'A') return false;
		if(s.substring(2, s.length() - 1).indexOf('C') != s.substring(2, s.length() - 1).lastIndexOf('C') || s.substring(2, s.length() - 1).indexOf('C') == -1) {
			return false;
		}
		char[] str = s.toCharArray();
		str[0] = 'a';
		str[s.substring(2, s.length() - 1).indexOf('C') + 2] = 'c';
		return String.valueOf(str).equals(s.toLowerCase());
	}
	static long mod = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(check(S)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
}
