
import java.util.Iterator;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		
		String ans = "WA";
		if (s.charAt(0) == 'A') {
			int count = 0;
			int index = 0;
			for (int i = 2; i < s.length() - 1; i++) {
				if (s.charAt(i) == 'C') {
					count++;
					index = i;
				}
			}
			if (count == 1) {
				boolean flg = true; 
				for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				}
				if (flg) {
					ans ="AC";
				}
			}
		}
		System.out.println(ans);
	}
} import java.util.Iterator; Iterator java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		
		String ans = "WA";
		if (s.charAt(0) == 'A') {
			int count = 0;
			int index = 0;
			for (int i = 2; i < s.length() - 1; i++) {
				if (s.charAt(i) == 'C') {
					count++;
					index = i;
				}
			}
			if (count == 1) {
				boolean flg = true; 
				for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				}
				if (flg) {
					ans ="AC";
				}
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		
		String ans = "WA";
		if (s.charAt(0) == 'A') {
			int count = 0;
			int index = 0;
			for (int i = 2; i < s.length() - 1; i++) {
				if (s.charAt(i) == 'C') {
					count++;
					index = i;
				}
			}
			if (count == 1) {
				boolean flg = true; 
				for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				}
				if (flg) {
					ans ="AC";
				}
			}
		}
		System.out.println(ans);
	} main {

		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		
		String ans = "WA";
		if (s.charAt(0) == 'A') {
			int count = 0;
			int index = 0;
			for (int i = 2; i < s.length() - 1; i++) {
				if (s.charAt(i) == 'C') {
					count++;
					index = i;
				}
			}
			if (count == 1) {
				boolean flg = true; 
				for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				}
				if (flg) {
					ans ="AC";
				}
			}
		}
		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan String ans = "WA"; ans "WA" if (s.charAt(0) == 'A') {
			int count = 0;
			int index = 0;
			for (int i = 2; i < s.length() - 1; i++) {
				if (s.charAt(i) == 'C') {
					count++;
					index = i;
				}
			}
			if (count == 1) {
				boolean flg = true; 
				for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				}
				if (flg) {
					ans ="AC";
				}
			}
		} s.charAt(0) == 'A' s.charAt(0) s.charAt s 0 'A' {
			int count = 0;
			int index = 0;
			for (int i = 2; i < s.length() - 1; i++) {
				if (s.charAt(i) == 'C') {
					count++;
					index = i;
				}
			}
			if (count == 1) {
				boolean flg = true; 
				for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				}
				if (flg) {
					ans ="AC";
				}
			}
		} int count = 0; count 0 int index = 0; index 0 for (int i = 2; i < s.length() - 1; i++) {
				if (s.charAt(i) == 'C') {
					count++;
					index = 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') {
					count++;
					index = i;
				}
			} {
				if (s.charAt(i) == 'C') {
					count++;
					index = i;
				}
			} if (s.charAt(i) == 'C') {
					count++;
					index = i;
				} s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
					count++;
					index = i;
				} count++ count index = i index i if (count == 1) {
				boolean flg = true; 
				for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				}
				if (flg) {
					ans ="AC";
				}
			} count == 1 count 1 {
				boolean flg = true; 
				for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				}
				if (flg) {
					ans ="AC";
				}
			} boolean flg = true; flg true for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				} int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				} {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				} if (i == index) {
						continue;
					} i == index i index {
						continue;
					} continue; if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					} Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
						flg = false;
						break;
					} flg = false flg false break; if (flg) {
					ans ="AC";
				} flg {
					ans ="AC";
				} ans ="AC" ans "AC" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		
		String ans = "WA";
		if (s.charAt(0) == 'A') {
			int count = 0;
			int index = 0;
			for (int i = 2; i < s.length() - 1; i++) {
				if (s.charAt(i) == 'C') {
					count++;
					index = i;
				}
			}
			if (count == 1) {
				boolean flg = true; 
				for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				}
				if (flg) {
					ans ="AC";
				}
			}
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		
		String ans = "WA";
		if (s.charAt(0) == 'A') {
			int count = 0;
			int index = 0;
			for (int i = 2; i < s.length() - 1; i++) {
				if (s.charAt(i) == 'C') {
					count++;
					index = i;
				}
			}
			if (count == 1) {
				boolean flg = true; 
				for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				}
				if (flg) {
					ans ="AC";
				}
			}
		}
		System.out.println(ans);
	}
} Main

import java.util.Iterator;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		
		String ans = "WA";
		if (s.charAt(0) == 'A') {
			int count = 0;
			int index = 0;
			for (int i = 2; i < s.length() - 1; i++) {
				if (s.charAt(i) == 'C') {
					count++;
					index = i;
				}
			}
			if (count == 1) {
				boolean flg = true; 
				for (int i = 1; i < s.length(); i++) {
					if (i == index) {
						continue;
					}
					
					if (Character.isUpperCase(s.charAt(i))) {
						flg = false;
						break;
					}
					
				}
				if (flg) {
					ans ="AC";
				}
			}
		}
		System.out.println(ans);
	}
}