import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		
		int cCount = 0;
		
		if(s.matches("A[a-z][Ca-z]*[a-z]"))
			for(int i = 2; i < s.length()-1; i++) {
				char c = s.charAt(i);
				char e = 'C';
				if(c == e)
					cCount++;
			}
			if(cCount == 1)
				System.out.println("AC");
		else
			System.out.println("WA");
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		
		int cCount = 0;
		
		if(s.matches("A[a-z][Ca-z]*[a-z]"))
			for(int i = 2; i < s.length()-1; i++) {
				char c = s.charAt(i);
				char e = 'C';
				if(c == e)
					cCount++;
			}
			if(cCount == 1)
				System.out.println("AC");
		else
			System.out.println("WA");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		
		int cCount = 0;
		
		if(s.matches("A[a-z][Ca-z]*[a-z]"))
			for(int i = 2; i < s.length()-1; i++) {
				char c = s.charAt(i);
				char e = 'C';
				if(c == e)
					cCount++;
			}
			if(cCount == 1)
				System.out.println("AC");
		else
			System.out.println("WA");
	} main {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		
		int cCount = 0;
		
		if(s.matches("A[a-z][Ca-z]*[a-z]"))
			for(int i = 2; i < s.length()-1; i++) {
				char c = s.charAt(i);
				char e = 'C';
				if(c == e)
					cCount++;
			}
			if(cCount == 1)
				System.out.println("AC");
		else
			System.out.println("WA");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int cCount = 0; cCount 0 if(s.matches("A[a-z][Ca-z]*[a-z]"))
			for(int i = 2; i < s.length()-1; i++) {
				char c = s.charAt(i);
				char e = 'C';
				if(c == e)
					cCount++;
			} s.matches("A[a-z][Ca-z]*[a-z]") s.matches s "A[a-z][Ca-z]*[a-z]" for(int i = 2; i < s.length()-1; i++) {
				char c = s.charAt(i);
				char e = 'C';
				if(c == e)
					cCount++;
			} 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 {
				char c = s.charAt(i);
				char e = 'C';
				if(c == e)
					cCount++;
			} {
				char c = s.charAt(i);
				char e = 'C';
				if(c == e)
					cCount++;
			} char c = s.charAt(i); c s.charAt(i) s.charAt s i char e = 'C'; e 'C' if(c == e)
					cCount++; c == e c e cCount++ cCount if(cCount == 1)
				System.out.println("AC");
		else
			System.out.println("WA"); cCount == 1 cCount 1 System.out.println("AC") System.out.println System.out System System.out "AC" System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		
		int cCount = 0;
		
		if(s.matches("A[a-z][Ca-z]*[a-z]"))
			for(int i = 2; i < s.length()-1; i++) {
				char c = s.charAt(i);
				char e = 'C';
				if(c == e)
					cCount++;
			}
			if(cCount == 1)
				System.out.println("AC");
		else
			System.out.println("WA");
	}
}