import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		String check = S.toUpperCase();
		if(S.charAt(0) == 'A') {
			int count = 0;
			for(int i = 1; i < S.length(); i++) {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			}
			if(count == 1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
			return;
		}
	}

} 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();
		sc.close();

		String check = S.toUpperCase();
		if(S.charAt(0) == 'A') {
			int count = 0;
			for(int i = 1; i < S.length(); i++) {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			}
			if(count == 1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
			return;
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		String check = S.toUpperCase();
		if(S.charAt(0) == 'A') {
			int count = 0;
			for(int i = 1; i < S.length(); i++) {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			}
			if(count == 1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
			return;
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		String check = S.toUpperCase();
		if(S.charAt(0) == 'A') {
			int count = 0;
			for(int i = 1; i < S.length(); i++) {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			}
			if(count == 1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
			return;
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc String check = S.toUpperCase(); check S.toUpperCase() S.toUpperCase S if(S.charAt(0) == 'A') {
			int count = 0;
			for(int i = 1; i < S.length(); i++) {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			}
			if(count == 1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
			return;
		} S.charAt(0) == 'A' S.charAt(0) S.charAt S 0 'A' {
			int count = 0;
			for(int i = 1; i < S.length(); i++) {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			}
			if(count == 1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		} int count = 0; count 0 for(int i = 1; i < S.length(); i++) {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			} int i = 1; int i = 1; i 1 i < S.length() i S.length() S.length S i++ i++ i {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			} {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			} if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				} i != 1 && i != S.length() - 1 && S.charAt(i) == 'C' i != 1 && i != S.length() - 1 && S.charAt(i) == 'C' i != 1 i 1 i != S.length() - 1 i S.length() - 1 S.length() S.length S 1 S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
					count++;
					continue;
				} count++ count continue; if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				} S.charAt(i) == check.charAt(i) S.charAt(i) S.charAt S i check.charAt(i) check.charAt check i {
					System.out.println("WA");
					return;
				} System.out.println("WA") System.out.println System.out System System.out "WA" return; if(count == 1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			} count == 1 count 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" {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		String check = S.toUpperCase();
		if(S.charAt(0) == 'A') {
			int count = 0;
			for(int i = 1; i < S.length(); i++) {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			}
			if(count == 1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
			return;
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		String check = S.toUpperCase();
		if(S.charAt(0) == 'A') {
			int count = 0;
			for(int i = 1; i < S.length(); i++) {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			}
			if(count == 1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
			return;
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		String check = S.toUpperCase();
		if(S.charAt(0) == 'A') {
			int count = 0;
			for(int i = 1; i < S.length(); i++) {
				if(i != 1 && i != S.length() - 1 && S.charAt(i) == 'C') {
					count++;
					continue;
				}
				if(S.charAt(i) == check.charAt(i)) {
					System.out.println("WA");
					return;
				}
			}
			if(count == 1) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
			return;
		}
	}

}