import java.util.Scanner;

public class Main {

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

} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		String lower = "abcdefghijklmnopqrstuvwxyz";
		if(s.charAt(0)!='A') {
			System.out.println("WA");
		}else {
			if(!lower.contains(s.charAt(1)+"")) {
				System.out.println("WA");
				return;
			}
			int Ccount = 0;
			for(int i=2;i<s.length()-1;i++) {
				if(s.charAt(i)=='C') {
					Ccount++;
				}else {
					if(!lower.contains(s.charAt(i)+"")) {
						System.out.println("WA");
						return;
					}
				}
			}
			if(!lower.contains(s.charAt(s.length()-1)+"")) {
				System.out.println("WA");
				return;
			}
			if(Ccount==1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}
		
		
	} main {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		String lower = "abcdefghijklmnopqrstuvwxyz";
		if(s.charAt(0)!='A') {
			System.out.println("WA");
		}else {
			if(!lower.contains(s.charAt(1)+"")) {
				System.out.println("WA");
				return;
			}
			int Ccount = 0;
			for(int i=2;i<s.length()-1;i++) {
				if(s.charAt(i)=='C') {
					Ccount++;
				}else {
					if(!lower.contains(s.charAt(i)+"")) {
						System.out.println("WA");
						return;
					}
				}
			}
			if(!lower.contains(s.charAt(s.length()-1)+"")) {
				System.out.println("WA");
				return;
			}
			if(Ccount==1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}
		
		
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.next(); s in.next() in.next in String lower = "abcdefghijklmnopqrstuvwxyz"; lower "abcdefghijklmnopqrstuvwxyz" if(s.charAt(0)!='A') {
			System.out.println("WA");
		}else {
			if(!lower.contains(s.charAt(1)+"")) {
				System.out.println("WA");
				return;
			}
			int Ccount = 0;
			for(int i=2;i<s.length()-1;i++) {
				if(s.charAt(i)=='C') {
					Ccount++;
				}else {
					if(!lower.contains(s.charAt(i)+"")) {
						System.out.println("WA");
						return;
					}
				}
			}
			if(!lower.contains(s.charAt(s.length()-1)+"")) {
				System.out.println("WA");
				return;
			}
			if(Ccount==1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		} s.charAt(0)!='A' s.charAt(0) s.charAt s 0 'A' {
			System.out.println("WA");
		} System.out.println("WA") System.out.println System.out System System.out "WA" {
			if(!lower.contains(s.charAt(1)+"")) {
				System.out.println("WA");
				return;
			}
			int Ccount = 0;
			for(int i=2;i<s.length()-1;i++) {
				if(s.charAt(i)=='C') {
					Ccount++;
				}else {
					if(!lower.contains(s.charAt(i)+"")) {
						System.out.println("WA");
						return;
					}
				}
			}
			if(!lower.contains(s.charAt(s.length()-1)+"")) {
				System.out.println("WA");
				return;
			}
			if(Ccount==1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		} if(!lower.contains(s.charAt(1)+"")) {
				System.out.println("WA");
				return;
			} !lower.contains(s.charAt(1)+"") lower.contains(s.charAt(1)+"") lower.contains lower s.charAt(1)+"" s.charAt(1) s.charAt s 1 "" {
				System.out.println("WA");
				return;
			} System.out.println("WA") System.out.println System.out System System.out "WA" return; int Ccount = 0; Ccount 0 for(int i=2;i<s.length()-1;i++) {
				if(s.charAt(i)=='C') {
					Ccount++;
				}else {
					if(!lower.contains(s.charAt(i)+"")) {
						System.out.println("WA");
						return;
					}
				}
			} 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(s.charAt(i)=='C') {
					Ccount++;
				}else {
					if(!lower.contains(s.charAt(i)+"")) {
						System.out.println("WA");
						return;
					}
				}
			} {
				if(s.charAt(i)=='C') {
					Ccount++;
				}else {
					if(!lower.contains(s.charAt(i)+"")) {
						System.out.println("WA");
						return;
					}
				}
			} if(s.charAt(i)=='C') {
					Ccount++;
				}else {
					if(!lower.contains(s.charAt(i)+"")) {
						System.out.println("WA");
						return;
					}
				} s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' {
					Ccount++;
				} Ccount++ Ccount {
					if(!lower.contains(s.charAt(i)+"")) {
						System.out.println("WA");
						return;
					}
				} if(!lower.contains(s.charAt(i)+"")) {
						System.out.println("WA");
						return;
					} !lower.contains(s.charAt(i)+"") lower.contains(s.charAt(i)+"") lower.contains lower s.charAt(i)+"" s.charAt(i) s.charAt s i "" {
						System.out.println("WA");
						return;
					} System.out.println("WA") System.out.println System.out System System.out "WA" return; if(!lower.contains(s.charAt(s.length()-1)+"")) {
				System.out.println("WA");
				return;
			} !lower.contains(s.charAt(s.length()-1)+"") lower.contains(s.charAt(s.length()-1)+"") lower.contains lower s.charAt(s.length()-1)+"" s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 "" {
				System.out.println("WA");
				return;
			} System.out.println("WA") System.out.println System.out System System.out "WA" return; if(Ccount==1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			} Ccount==1 Ccount 1 {
				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 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		String lower = "abcdefghijklmnopqrstuvwxyz";
		if(s.charAt(0)!='A') {
			System.out.println("WA");
		}else {
			if(!lower.contains(s.charAt(1)+"")) {
				System.out.println("WA");
				return;
			}
			int Ccount = 0;
			for(int i=2;i<s.length()-1;i++) {
				if(s.charAt(i)=='C') {
					Ccount++;
				}else {
					if(!lower.contains(s.charAt(i)+"")) {
						System.out.println("WA");
						return;
					}
				}
			}
			if(!lower.contains(s.charAt(s.length()-1)+"")) {
				System.out.println("WA");
				return;
			}
			if(Ccount==1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}
		
		
	}

} public class Main {

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

}
