import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		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 sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    } main {
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc sc.close() sc.close sc char[] s = str.toCharArray(); s str.toCharArray() str.toCharArray str boolean flag = true flag true existC = false; existC false if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false; s.length < 4 || s.length > 10 || s[0] != 'A' s.length < 4 || s.length > 10 || s[0] != 'A' s.length < 4 s.length s s.length 4 s.length > 10 s.length s s.length 10 s[0] != 'A' s[0] s 0 'A' flag = false flag false for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	} int i = 1; int i = 1; i 1 i < s.length && flag i < s.length i s.length s s.length flag ++i ++i i {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	} {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	} if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			} s[i] <= 'z' && s[i] >= 'a' s[i] <= 'z' s[i] s i 'z' s[i] >= 'a' s[i] s i 'a' continue; if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			} s[i] == 'C' s[i] s i 'C' {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false; !existC && i > 1 && i < s.length-1 !existC && i > 1 && i < s.length-1 !existC existC i > 1 i 1 i < s.length-1 i s.length-1 s.length s s.length 1 existC = true existC true flag = false flag false {
				flag = false;
			} flag = false flag false if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA"); flag && existC flag existC System.out.println("AC") System.out.println System.out System System.out "AC" 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 sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    }
} public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    }
}