
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		boolean accepted=false;
		int Cp=0;
		if(str.charAt(0)=='A') {
			twoloop:for(int k=2;k<str.length()-1;k++) {
				if(str.charAt(k)=='C') {
					for(int j=0;j<str.length();j++) {
						if(str.charAt(j)=='C') {
							Cp++;
							continue;
						}
						if(str.charAt(j)=='A') continue;
						if(Character.isUpperCase(str.charAt(j))==true){
							break twoloop;
						}
					}
					accepted=true;
					break;
				}
			}
		}
		//System.out.println(Cp);
		if(accepted&&Cp==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 sc = new Scanner(System.in);
		String str = sc.nextLine();
		boolean accepted=false;
		int Cp=0;
		if(str.charAt(0)=='A') {
			twoloop:for(int k=2;k<str.length()-1;k++) {
				if(str.charAt(k)=='C') {
					for(int j=0;j<str.length();j++) {
						if(str.charAt(j)=='C') {
							Cp++;
							continue;
						}
						if(str.charAt(j)=='A') continue;
						if(Character.isUpperCase(str.charAt(j))==true){
							break twoloop;
						}
					}
					accepted=true;
					break;
				}
			}
		}
		//System.out.println(Cp);
		if(accepted&&Cp==1) {
			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.nextLine();
		boolean accepted=false;
		int Cp=0;
		if(str.charAt(0)=='A') {
			twoloop:for(int k=2;k<str.length()-1;k++) {
				if(str.charAt(k)=='C') {
					for(int j=0;j<str.length();j++) {
						if(str.charAt(j)=='C') {
							Cp++;
							continue;
						}
						if(str.charAt(j)=='A') continue;
						if(Character.isUpperCase(str.charAt(j))==true){
							break twoloop;
						}
					}
					accepted=true;
					break;
				}
			}
		}
		//System.out.println(Cp);
		if(accepted&&Cp==1) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		boolean accepted=false;
		int Cp=0;
		if(str.charAt(0)=='A') {
			twoloop:for(int k=2;k<str.length()-1;k++) {
				if(str.charAt(k)=='C') {
					for(int j=0;j<str.length();j++) {
						if(str.charAt(j)=='C') {
							Cp++;
							continue;
						}
						if(str.charAt(j)=='A') continue;
						if(Character.isUpperCase(str.charAt(j))==true){
							break twoloop;
						}
					}
					accepted=true;
					break;
				}
			}
		}
		//System.out.println(Cp);
		if(accepted&&Cp==1) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc boolean accepted=false; accepted false int Cp=0; Cp 0 if(str.charAt(0)=='A') {
			twoloop:for(int k=2;k<str.length()-1;k++) {
				if(str.charAt(k)=='C') {
					for(int j=0;j<str.length();j++) {
						if(str.charAt(j)=='C') {
							Cp++;
							continue;
						}
						if(str.charAt(j)=='A') continue;
						if(Character.isUpperCase(str.charAt(j))==true){
							break twoloop;
						}
					}
					accepted=true;
					break;
				}
			}
		} str.charAt(0)=='A' str.charAt(0) str.charAt str 0 'A' {
			twoloop:for(int k=2;k<str.length()-1;k++) {
				if(str.charAt(k)=='C') {
					for(int j=0;j<str.length();j++) {
						if(str.charAt(j)=='C') {
							Cp++;
							continue;
						}
						if(str.charAt(j)=='A') continue;
						if(Character.isUpperCase(str.charAt(j))==true){
							break twoloop;
						}
					}
					accepted=true;
					break;
				}
			}
		} if(accepted&&Cp==1) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		} accepted&&Cp==1 accepted Cp==1 Cp 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 sc = new Scanner(System.in);
		String str = sc.nextLine();
		boolean accepted=false;
		int Cp=0;
		if(str.charAt(0)=='A') {
			twoloop:for(int k=2;k<str.length()-1;k++) {
				if(str.charAt(k)=='C') {
					for(int j=0;j<str.length();j++) {
						if(str.charAt(j)=='C') {
							Cp++;
							continue;
						}
						if(str.charAt(j)=='A') continue;
						if(Character.isUpperCase(str.charAt(j))==true){
							break twoloop;
						}
					}
					accepted=true;
					break;
				}
			}
		}
		//System.out.println(Cp);
		if(accepted&&Cp==1) {
			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.nextLine();
		boolean accepted=false;
		int Cp=0;
		if(str.charAt(0)=='A') {
			twoloop:for(int k=2;k<str.length()-1;k++) {
				if(str.charAt(k)=='C') {
					for(int j=0;j<str.length();j++) {
						if(str.charAt(j)=='C') {
							Cp++;
							continue;
						}
						if(str.charAt(j)=='A') continue;
						if(Character.isUpperCase(str.charAt(j))==true){
							break twoloop;
						}
					}
					accepted=true;
					break;
				}
			}
		}
		//System.out.println(Cp);
		if(accepted&&Cp==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 sc = new Scanner(System.in);
		String str = sc.nextLine();
		boolean accepted=false;
		int Cp=0;
		if(str.charAt(0)=='A') {
			twoloop:for(int k=2;k<str.length()-1;k++) {
				if(str.charAt(k)=='C') {
					for(int j=0;j<str.length();j++) {
						if(str.charAt(j)=='C') {
							Cp++;
							continue;
						}
						if(str.charAt(j)=='A') continue;
						if(Character.isUpperCase(str.charAt(j))==true){
							break twoloop;
						}
					}
					accepted=true;
					break;
				}
			}
		}
		//System.out.println(Cp);
		if(accepted&&Cp==1) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}

}
