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.substring(1,2).toLowerCase()).equals(S.substring(1,2)) &&
				(S.substring(S.length()-1)).toLowerCase().equals(S.substring(S.length()-1))) {
			for(int i = 2; i < S.length()-1; i++) {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			}
		}
		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.substring(1,2).toLowerCase()).equals(S.substring(1,2)) &&
				(S.substring(S.length()-1)).toLowerCase().equals(S.substring(S.length()-1))) {
			for(int i = 2; i < S.length()-1; i++) {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			}
		}
		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.substring(1,2).toLowerCase()).equals(S.substring(1,2)) &&
				(S.substring(S.length()-1)).toLowerCase().equals(S.substring(S.length()-1))) {
			for(int i = 2; i < S.length()-1; i++) {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			}
		}
		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.substring(1,2).toLowerCase()).equals(S.substring(1,2)) &&
				(S.substring(S.length()-1)).toLowerCase().equals(S.substring(S.length()-1))) {
			for(int i = 2; i < S.length()-1; i++) {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			}
		}
		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.substring(1,2).toLowerCase()).equals(S.substring(1,2)) &&
				(S.substring(S.length()-1)).toLowerCase().equals(S.substring(S.length()-1))) {
			for(int i = 2; i < S.length()-1; i++) {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			}
		} "A".equals(S.substring(0,1)) &&
				(S.substring(1,2).toLowerCase()).equals(S.substring(1,2)) &&
				(S.substring(S.length()-1)).toLowerCase().equals(S.substring(S.length()-1)) "A".equals(S.substring(0,1)) &&
				(S.substring(1,2).toLowerCase()).equals(S.substring(1,2)) &&
				(S.substring(S.length()-1)).toLowerCase().equals(S.substring(S.length()-1)) "A".equals(S.substring(0,1)) "A".equals "A" S.substring(0,1) S.substring S 0 1 (S.substring(1,2).toLowerCase()).equals(S.substring(1,2)) (S.substring(1,2).toLowerCase()).equals (S.substring(1,2).toLowerCase()) S.substring(1,2).toLowerCase S.substring(1,2) S.substring S 1 2 S.substring(1,2) S.substring S 1 2 (S.substring(S.length()-1)).toLowerCase().equals(S.substring(S.length()-1)) (S.substring(S.length()-1)).toLowerCase().equals (S.substring(S.length()-1)).toLowerCase() (S.substring(S.length()-1)).toLowerCase (S.substring(S.length()-1)) S.substring S S.length()-1 S.length() S.length S 1 S.substring(S.length()-1) S.substring S S.length()-1 S.length() S.length S 1 {
			for(int i = 2; i < S.length()-1; i++) {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			}
		} for(int i = 2; i < S.length()-1; i++) {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			} int i = 2; int i = 2; i 2 i < S.length()-1 i S.length()-1 S.length() S.length S 1 i++ i++ i {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			} {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			} if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				} "C".equals(S.substring(i,i+1)) "C".equals "C" S.substring(i,i+1) S.substring S i i+1 i 1 {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				} if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					} "WA".equals(result) "WA".equals "WA" result {
						result = "AC";
					} result = "AC" result "AC" {
						result = "WA";
						break;
					} result = "WA" result "WA" break; if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				} !(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1)) (S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1)) (S.substring(i,i+1).toLowerCase()).equals (S.substring(i,i+1).toLowerCase()) S.substring(i,i+1).toLowerCase S.substring(i,i+1) S.substring S i i+1 i 1 S.substring(i,i+1) S.substring S i i+1 i 1 {
					result = "WA";
					break;
				} result = "WA" result "WA" break; 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.substring(1,2).toLowerCase()).equals(S.substring(1,2)) &&
				(S.substring(S.length()-1)).toLowerCase().equals(S.substring(S.length()-1))) {
			for(int i = 2; i < S.length()-1; i++) {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			}
		}
		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.substring(1,2).toLowerCase()).equals(S.substring(1,2)) &&
				(S.substring(S.length()-1)).toLowerCase().equals(S.substring(S.length()-1))) {
			for(int i = 2; i < S.length()-1; i++) {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			}
		}
		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.substring(1,2).toLowerCase()).equals(S.substring(1,2)) &&
				(S.substring(S.length()-1)).toLowerCase().equals(S.substring(S.length()-1))) {
			for(int i = 2; i < S.length()-1; i++) {
				if("C".equals(S.substring(i,i+1))) {
					if("WA".equals(result)) {
						result = "AC";
					}else {
						result = "WA";
						break;
					}
				}else if(!(S.substring(i,i+1).toLowerCase()).equals(S.substring(i,i+1))) {
					result = "WA";
					break;
				}
			}
		}
		System.out.println(result);
	}
}
