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();
		int check=0;
		if(s.charAt(0)=='A') {
			for(int i=1;i<s.length();i++) {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			}
		}
		if(check==1)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 scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		int check=0;
		if(s.charAt(0)=='A') {
			for(int i=1;i<s.length();i++) {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			}
		}
		if(check==1)System.out.println("AC");
		else System.out.println("WA");
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		int check=0;
		if(s.charAt(0)=='A') {
			for(int i=1;i<s.length();i++) {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			}
		}
		if(check==1)System.out.println("AC");
		else System.out.println("WA");
	} main {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		int check=0;
		if(s.charAt(0)=='A') {
			for(int i=1;i<s.length();i++) {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			}
		}
		if(check==1)System.out.println("AC");
		else System.out.println("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 int check=0; check 0 if(s.charAt(0)=='A') {
			for(int i=1;i<s.length();i++) {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			}
		} s.charAt(0)=='A' s.charAt(0) s.charAt s 0 'A' {
			for(int i=1;i<s.length();i++) {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			}
		} for(int i=1;i<s.length();i++) {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			} int i=1; int i=1; i 1 i<s.length() i s.length() s.length s i++ i++ i {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			} {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			} if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				} s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' {
					if(2<=i&&i<s.length()-1)check+=1;
				} if(2<=i&&i<s.length()-1)check+=1; 2<=i&&i<s.length()-1 2<=i 2 i i<s.length()-1 i s.length()-1 s.length() s.length s 1 check+=1 check 1 if(s.charAt(i)<'a') {
					check=-1;
					break;
				} s.charAt(i)<'a' s.charAt(i) s.charAt s i 'a' {
					check=-1;
					break;
				} check=-1 check -1 1 break; if(check==1)System.out.println("AC");
		else System.out.println("WA"); check==1 check 1 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 scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		int check=0;
		if(s.charAt(0)=='A') {
			for(int i=1;i<s.length();i++) {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			}
		}
		if(check==1)System.out.println("AC");
		else System.out.println("WA");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		int check=0;
		if(s.charAt(0)=='A') {
			for(int i=1;i<s.length();i++) {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			}
		}
		if(check==1)System.out.println("AC");
		else System.out.println("WA");
	}
} 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();
		int check=0;
		if(s.charAt(0)=='A') {
			for(int i=1;i<s.length();i++) {
				if(s.charAt(i)=='C') {
					if(2<=i&&i<s.length()-1)check+=1;
				}else if(s.charAt(i)<'a') {
					check=-1;
					break;
				}
			}
		}
		if(check==1)System.out.println("AC");
		else System.out.println("WA");
	}
}
