import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		
		System.out.print(check(S) ? "AC" : "WA"); 
	}
	
	private static boolean check (String S) {
		int len = S.length();
		int cCount = 0;
		for (int i = 0 ; i < len ; i++) {
			char ch = S.charAt(i);
			if (i == 0) {
				if (ch != 'A') {
					return false;					
				}
			} else if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			}
		}
		
		return true;
	}
	
	private static boolean checkSmall (char ch) {
		if (!(ch >= 0x61 && ch <= 0x7A)){
			return false;
		}
		return true;
	}
} 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();
		scan.close();
		
		System.out.print(check(S) ? "AC" : "WA"); 
	}
	
	private static boolean check (String S) {
		int len = S.length();
		int cCount = 0;
		for (int i = 0 ; i < len ; i++) {
			char ch = S.charAt(i);
			if (i == 0) {
				if (ch != 'A') {
					return false;					
				}
			} else if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			}
		}
		
		return true;
	}
	
	private static boolean checkSmall (char ch) {
		if (!(ch >= 0x61 && ch <= 0x7A)){
			return false;
		}
		return true;
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		
		System.out.print(check(S) ? "AC" : "WA"); 
	} main {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		
		System.out.print(check(S) ? "AC" : "WA"); 
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan scan.close() scan.close scan System.out.print(check(S) ? "AC" : "WA") System.out.print System.out System System.out check(S) ? "AC" : "WA" check(S) check S "AC" "WA" String[] args args private static boolean check (String S) {
		int len = S.length();
		int cCount = 0;
		for (int i = 0 ; i < len ; i++) {
			char ch = S.charAt(i);
			if (i == 0) {
				if (ch != 'A') {
					return false;					
				}
			} else if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			}
		}
		
		return true;
	} check {
		int len = S.length();
		int cCount = 0;
		for (int i = 0 ; i < len ; i++) {
			char ch = S.charAt(i);
			if (i == 0) {
				if (ch != 'A') {
					return false;					
				}
			} else if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			}
		}
		
		return true;
	} int len = S.length(); len S.length() S.length S int cCount = 0; cCount 0 for (int i = 0 ; i < len ; i++) {
			char ch = S.charAt(i);
			if (i == 0) {
				if (ch != 'A') {
					return false;					
				}
			} else if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			}
		} int i = 0 ; int i = 0 ; i 0 i < len i len i++ i++ i {
			char ch = S.charAt(i);
			if (i == 0) {
				if (ch != 'A') {
					return false;					
				}
			} else if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			}
		} {
			char ch = S.charAt(i);
			if (i == 0) {
				if (ch != 'A') {
					return false;					
				}
			} else if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			}
		} char ch = S.charAt(i); ch S.charAt(i) S.charAt S i if (i == 0) {
				if (ch != 'A') {
					return false;					
				}
			} else if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			} i == 0 i 0 {
				if (ch != 'A') {
					return false;					
				}
			} if (ch != 'A') {
					return false;					
				} ch != 'A' ch 'A' {
					return false;					
				} return false; false if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			} i == 1 i 1 {
				if (!checkSmall(ch)) {
					return false;
				}
			} if (!checkSmall(ch)) {
					return false;
				} !checkSmall(ch) checkSmall(ch) checkSmall ch {
					return false;
				} return false; false if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			} i > 1 && i < len - 1 i > 1 i 1 i < len - 1 i len - 1 len 1 {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				} ch == 'C' ch 'C' {
					cCount++;
				} cCount++ cCount if (!checkSmall(ch)){
					return false;
				} !checkSmall(ch) checkSmall(ch) checkSmall ch {
					return false;
				} return false; false {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			} if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				} cCount != 1 cCount 1 {
					return false;
				} return false; false if (!checkSmall(ch)){
					return false;
				} !checkSmall(ch) checkSmall(ch) checkSmall ch {
					return false;
				} return false; false return true; true String S S private static boolean checkSmall (char ch) {
		if (!(ch >= 0x61 && ch <= 0x7A)){
			return false;
		}
		return true;
	} checkSmall {
		if (!(ch >= 0x61 && ch <= 0x7A)){
			return false;
		}
		return true;
	} if (!(ch >= 0x61 && ch <= 0x7A)){
			return false;
		} !(ch >= 0x61 && ch <= 0x7A) (ch >= 0x61 && ch <= 0x7A) ch >= 0x61 ch 0x61 ch <= 0x7A ch 0x7A {
			return false;
		} return false; false return true; true char ch ch public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		
		System.out.print(check(S) ? "AC" : "WA"); 
	}
	
	private static boolean check (String S) {
		int len = S.length();
		int cCount = 0;
		for (int i = 0 ; i < len ; i++) {
			char ch = S.charAt(i);
			if (i == 0) {
				if (ch != 'A') {
					return false;					
				}
			} else if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			}
		}
		
		return true;
	}
	
	private static boolean checkSmall (char ch) {
		if (!(ch >= 0x61 && ch <= 0x7A)){
			return false;
		}
		return true;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		
		System.out.print(check(S) ? "AC" : "WA"); 
	}
	
	private static boolean check (String S) {
		int len = S.length();
		int cCount = 0;
		for (int i = 0 ; i < len ; i++) {
			char ch = S.charAt(i);
			if (i == 0) {
				if (ch != 'A') {
					return false;					
				}
			} else if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			}
		}
		
		return true;
	}
	
	private static boolean checkSmall (char ch) {
		if (!(ch >= 0x61 && ch <= 0x7A)){
			return false;
		}
		return true;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		scan.close();
		
		System.out.print(check(S) ? "AC" : "WA"); 
	}
	
	private static boolean check (String S) {
		int len = S.length();
		int cCount = 0;
		for (int i = 0 ; i < len ; i++) {
			char ch = S.charAt(i);
			if (i == 0) {
				if (ch != 'A') {
					return false;					
				}
			} else if (i == 1) {
				if (!checkSmall(ch)) {
					return false;
				}
			} else if (i > 1 && i < len - 1) {
				if (ch == 'C') {
					cCount++;
				} else if (!checkSmall(ch)){
					return false;
				}
			} else {
				if (cCount != 1) {
					return false;
				} else if (!checkSmall(ch)){
					return false;
				}
			}
		}
		
		return true;
	}
	
	private static boolean checkSmall (char ch) {
		if (!(ch >= 0x61 && ch <= 0x7A)){
			return false;
		}
		return true;
	}
}