import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		int L = str.length();
		int cnt = 0;

		boolean check = true;
		
		for (int i = 0; i < L; i++) {
			if ( i == 0) {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			}
			else if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			}
	}
		if (cnt != 1) {
			check = false;
		}
		
		if(check) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		int L = str.length();
		int cnt = 0;

		boolean check = true;
		
		for (int i = 0; i < L; i++) {
			if ( i == 0) {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			}
			else if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			}
	}
		if (cnt != 1) {
			check = false;
		}
		
		if(check) {
			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();
		int L = str.length();
		int cnt = 0;

		boolean check = true;
		
		for (int i = 0; i < L; i++) {
			if ( i == 0) {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			}
			else if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			}
	}
		if (cnt != 1) {
			check = false;
		}
		
		if(check) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
} main {
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		int L = str.length();
		int cnt = 0;

		boolean check = true;
		
		for (int i = 0; i < L; i++) {
			if ( i == 0) {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			}
			else if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			}
	}
		if (cnt != 1) {
			check = false;
		}
		
		if(check) {
			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 int L = str.length(); L str.length() str.length str int cnt = 0; cnt 0 boolean check = true; check true for (int i = 0; i < L; i++) {
			if ( i == 0) {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			}
			else if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			}
	} int i = 0; int i = 0; i 0 i < L i L i++ i++ i {
			if ( i == 0) {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			}
			else if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			}
	} {
			if ( i == 0) {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			}
			else if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			}
	} if ( i == 0) {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			}
			else if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			} i == 0 i 0 {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			} if(str.charAt(i) != 'A') {
					check = false;
				} str.charAt(i) != 'A' str.charAt(i) str.charAt str i 'A' {
					check = false;
				} check = false check false if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			} 2 <= i && i <= L - 2 2 <= i 2 i i <= L - 2 i L - 2 L 2 {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			} if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				} str.charAt(i) == 'C' str.charAt(i) str.charAt str i 'C' {
					cnt++;
				} cnt++ cnt if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				} 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' 'A'<= str.charAt(i) 'A' str.charAt(i) str.charAt str i str.charAt(i) <= 'Z' str.charAt(i) str.charAt str i 'Z' {
					check = false;
				} check = false check false {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			} if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false; 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' 'A'<= str.charAt(i) 'A' str.charAt(i) str.charAt str i str.charAt(i) <= 'Z' str.charAt(i) str.charAt str i 'Z' check = false check false if (cnt != 1) {
			check = false;
		} cnt != 1 cnt 1 {
			check = false;
		} check = false check false if(check) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		} check {
			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();
		int L = str.length();
		int cnt = 0;

		boolean check = true;
		
		for (int i = 0; i < L; i++) {
			if ( i == 0) {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			}
			else if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			}
	}
		if (cnt != 1) {
			check = false;
		}
		
		if(check) {
			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();
		int L = str.length();
		int cnt = 0;

		boolean check = true;
		
		for (int i = 0; i < L; i++) {
			if ( i == 0) {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			}
			else if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			}
	}
		if (cnt != 1) {
			check = false;
		}
		
		if(check) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
}
} Main
import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		int L = str.length();
		int cnt = 0;

		boolean check = true;
		
		for (int i = 0; i < L; i++) {
			if ( i == 0) {
				if(str.charAt(i) != 'A') {
					check = false;
				}
			}
			else if( 2 <= i && i <= L - 2) {
				if (str.charAt(i) == 'C') {
					cnt++;
				}
				else if( 'A'<= str.charAt(i) && str.charAt(i) <= 'Z' ) {
					check = false;
				}
			}
			else {
				if('A'<= str.charAt(i) && str.charAt(i) <= 'Z')
					check = false;
			}
	}
		if (cnt != 1) {
			check = false;
		}
		
		if(check) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
}
}
