import java.util.Scanner;

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

		boolean flg = true;
		int cnt = 0;
		if(s.charAt(0) != 'A') flg = false;
		for (int i = 1; i < s.length(); i++) {
			if('A' <= s.charAt(i) && s.charAt(i) <= 'Z') {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			}
		}
		if(cnt != 1) flg = false;

		System.out.println(flg ? "AC" : "WA");
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s;
		s = sc.next();

		boolean flg = true;
		int cnt = 0;
		if(s.charAt(0) != 'A') flg = false;
		for (int i = 1; i < s.length(); i++) {
			if('A' <= s.charAt(i) && s.charAt(i) <= 'Z') {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			}
		}
		if(cnt != 1) flg = false;

		System.out.println(flg ? "AC" : "WA");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s;
		s = sc.next();

		boolean flg = true;
		int cnt = 0;
		if(s.charAt(0) != 'A') flg = false;
		for (int i = 1; i < s.length(); i++) {
			if('A' <= s.charAt(i) && s.charAt(i) <= 'Z') {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			}
		}
		if(cnt != 1) flg = false;

		System.out.println(flg ? "AC" : "WA");
	} main {
		Scanner sc = new Scanner(System.in);
		String s;
		s = sc.next();

		boolean flg = true;
		int cnt = 0;
		if(s.charAt(0) != 'A') flg = false;
		for (int i = 1; i < s.length(); i++) {
			if('A' <= s.charAt(i) && s.charAt(i) <= 'Z') {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			}
		}
		if(cnt != 1) flg = false;

		System.out.println(flg ? "AC" : "WA");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s; s s = sc.next() s sc.next() sc.next sc boolean flg = true; flg true int cnt = 0; cnt 0 if(s.charAt(0) != 'A') flg = false; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' flg = false flg false for (int i = 1; i < s.length(); i++) {
			if('A' <= s.charAt(i) && s.charAt(i) <= 'Z') {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			}
		} int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
			if('A' <= s.charAt(i) && s.charAt(i) <= 'Z') {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			}
		} {
			if('A' <= s.charAt(i) && s.charAt(i) <= 'Z') {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			}
		} if('A' <= s.charAt(i) && s.charAt(i) <= 'Z') {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			} 'A' <= s.charAt(i) && s.charAt(i) <= 'Z' 'A' <= s.charAt(i) 'A' s.charAt(i) s.charAt s i s.charAt(i) <= 'Z' s.charAt(i) s.charAt s i 'Z' {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			} if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				} i < 2 || i > s.length() - 2 || s.charAt(i) != 'C' i < 2 || i > s.length() - 2 || s.charAt(i) != 'C' i < 2 i 2 i > s.length() - 2 i s.length() - 2 s.length() s.length s 2 s.charAt(i) != 'C' s.charAt(i) s.charAt s i 'C' {
					flg = false;
				} flg = false flg false if(s.charAt(i) == 'C') cnt++; s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' cnt++ cnt if(cnt != 1) flg = false; cnt != 1 cnt 1 flg = false flg false System.out.println(flg ? "AC" : "WA") System.out.println System.out System System.out flg ? "AC" : "WA" flg "AC" "WA" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s;
		s = sc.next();

		boolean flg = true;
		int cnt = 0;
		if(s.charAt(0) != 'A') flg = false;
		for (int i = 1; i < s.length(); i++) {
			if('A' <= s.charAt(i) && s.charAt(i) <= 'Z') {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			}
		}
		if(cnt != 1) flg = false;

		System.out.println(flg ? "AC" : "WA");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s;
		s = sc.next();

		boolean flg = true;
		int cnt = 0;
		if(s.charAt(0) != 'A') flg = false;
		for (int i = 1; i < s.length(); i++) {
			if('A' <= s.charAt(i) && s.charAt(i) <= 'Z') {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			}
		}
		if(cnt != 1) flg = false;

		System.out.println(flg ? "AC" : "WA");
	}
} Main
import java.util.Scanner;

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

		boolean flg = true;
		int cnt = 0;
		if(s.charAt(0) != 'A') flg = false;
		for (int i = 1; i < s.length(); i++) {
			if('A' <= s.charAt(i) && s.charAt(i) <= 'Z') {
				if(i < 2 || i > s.length() - 2 || s.charAt(i) != 'C') {
					flg = false;
				}
				if(s.charAt(i) == 'C') cnt++;
			}
		}
		if(cnt != 1) flg = false;

		System.out.println(flg ? "AC" : "WA");
	}
}