import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		char c[] = S.toCharArray();
		Set<Integer> se = new HashSet<Integer>();

		if (c[0] != 'A') {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i < S.length() - 1; i++) {
			if (c[i] == 'C') {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			}
		}
		if(se.isEmpty()) {
			System.out.println("WA");
			return;
		}

		int a = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(c[i])) {
				a++;
			}
		}

		if (a != 2) {
			System.out.println("WA");
		} else {
			System.out.println("AC");
		}
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		char c[] = S.toCharArray();
		Set<Integer> se = new HashSet<Integer>();

		if (c[0] != 'A') {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i < S.length() - 1; i++) {
			if (c[i] == 'C') {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			}
		}
		if(se.isEmpty()) {
			System.out.println("WA");
			return;
		}

		int a = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(c[i])) {
				a++;
			}
		}

		if (a != 2) {
			System.out.println("WA");
		} else {
			System.out.println("AC");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		char c[] = S.toCharArray();
		Set<Integer> se = new HashSet<Integer>();

		if (c[0] != 'A') {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i < S.length() - 1; i++) {
			if (c[i] == 'C') {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			}
		}
		if(se.isEmpty()) {
			System.out.println("WA");
			return;
		}

		int a = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(c[i])) {
				a++;
			}
		}

		if (a != 2) {
			System.out.println("WA");
		} else {
			System.out.println("AC");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		char c[] = S.toCharArray();
		Set<Integer> se = new HashSet<Integer>();

		if (c[0] != 'A') {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i < S.length() - 1; i++) {
			if (c[i] == 'C') {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			}
		}
		if(se.isEmpty()) {
			System.out.println("WA");
			return;
		}

		int a = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(c[i])) {
				a++;
			}
		}

		if (a != 2) {
			System.out.println("WA");
		} else {
			System.out.println("AC");
		}
	} 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 char c[] = S.toCharArray(); c S.toCharArray() S.toCharArray S Set<Integer> se = new HashSet<Integer>(); se new HashSet<Integer>() if (c[0] != 'A') {
			System.out.println("WA");
			return;
		} c[0] != 'A' c[0] c 0 'A' {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i = 2; i < S.length() - 1; i++) {
			if (c[i] == 'C') {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			}
		} 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 (c[i] == 'C') {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			}
		} {
			if (c[i] == 'C') {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			}
		} if (c[i] == 'C') {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			} c[i] == 'C' c[i] c i 'C' {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			} if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				} se.contains(1) se.contains se 1 {
					System.out.println("WA");
					return;
				} System.out.println("WA") System.out.println System.out System System.out "WA" return; {
					se.add(1);
				} se.add(1) se.add se 1 if(se.isEmpty()) {
			System.out.println("WA");
			return;
		} se.isEmpty() se.isEmpty se {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; int a = 0; a 0 for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(c[i])) {
				a++;
			}
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			if (Character.isUpperCase(c[i])) {
				a++;
			}
		} {
			if (Character.isUpperCase(c[i])) {
				a++;
			}
		} if (Character.isUpperCase(c[i])) {
				a++;
			} Character.isUpperCase(c[i]) Character.isUpperCase Character c[i] c i {
				a++;
			} a++ a if (a != 2) {
			System.out.println("WA");
		} else {
			System.out.println("AC");
		} a != 2 a 2 {
			System.out.println("WA");
		} System.out.println("WA") System.out.println System.out System System.out "WA" {
			System.out.println("AC");
		} System.out.println("AC") System.out.println System.out System System.out "AC" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		char c[] = S.toCharArray();
		Set<Integer> se = new HashSet<Integer>();

		if (c[0] != 'A') {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i < S.length() - 1; i++) {
			if (c[i] == 'C') {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			}
		}
		if(se.isEmpty()) {
			System.out.println("WA");
			return;
		}

		int a = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(c[i])) {
				a++;
			}
		}

		if (a != 2) {
			System.out.println("WA");
		} else {
			System.out.println("AC");
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		char c[] = S.toCharArray();
		Set<Integer> se = new HashSet<Integer>();

		if (c[0] != 'A') {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i < S.length() - 1; i++) {
			if (c[i] == 'C') {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			}
		}
		if(se.isEmpty()) {
			System.out.println("WA");
			return;
		}

		int a = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(c[i])) {
				a++;
			}
		}

		if (a != 2) {
			System.out.println("WA");
		} else {
			System.out.println("AC");
		}
	}
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		char c[] = S.toCharArray();
		Set<Integer> se = new HashSet<Integer>();

		if (c[0] != 'A') {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i < S.length() - 1; i++) {
			if (c[i] == 'C') {
				if (se.contains(1)) {
					System.out.println("WA");
					return;
				} else {
					se.add(1);
				}
			}
		}
		if(se.isEmpty()) {
			System.out.println("WA");
			return;
		}

		int a = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(c[i])) {
				a++;
			}
		}

		if (a != 2) {
			System.out.println("WA");
		} else {
			System.out.println("AC");
		}
	}
}
