
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		
		if (s.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}
		
		int cnt = 0, c = 0;
		for (int i = 2; i < s.length() - 1; i++) {
			if (s.charAt(i) == 'C') {
				cnt++;
				c = i;
			}
		}
		if (cnt != 1) {
			System.out.println("WA");
			return;
		}
		
		for (int i = 1; i < s.length(); i++) {
			if (i == c) continue;
			if ((int)s.charAt(i) <= 90) {
				System.out.println("WA");
				return;
			}
		}
		
		System.out.println("AC");
		
	}

} 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();
		
		if (s.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}
		
		int cnt = 0, c = 0;
		for (int i = 2; i < s.length() - 1; i++) {
			if (s.charAt(i) == 'C') {
				cnt++;
				c = i;
			}
		}
		if (cnt != 1) {
			System.out.println("WA");
			return;
		}
		
		for (int i = 1; i < s.length(); i++) {
			if (i == c) continue;
			if ((int)s.charAt(i) <= 90) {
				System.out.println("WA");
				return;
			}
		}
		
		System.out.println("AC");
		
	}

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

} public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		
		if (s.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}
		
		int cnt = 0, c = 0;
		for (int i = 2; i < s.length() - 1; i++) {
			if (s.charAt(i) == 'C') {
				cnt++;
				c = i;
			}
		}
		if (cnt != 1) {
			System.out.println("WA");
			return;
		}
		
		for (int i = 1; i < s.length(); i++) {
			if (i == c) continue;
			if ((int)s.charAt(i) <= 90) {
				System.out.println("WA");
				return;
			}
		}
		
		System.out.println("AC");
		
	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		
		if (s.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}
		
		int cnt = 0, c = 0;
		for (int i = 2; i < s.length() - 1; i++) {
			if (s.charAt(i) == 'C') {
				cnt++;
				c = i;
			}
		}
		if (cnt != 1) {
			System.out.println("WA");
			return;
		}
		
		for (int i = 1; i < s.length(); i++) {
			if (i == c) continue;
			if ((int)s.charAt(i) <= 90) {
				System.out.println("WA");
				return;
			}
		}
		
		System.out.println("AC");
		
	}

}
