
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean ok = true;
		if (st.charAt(0)!='A') ok = false;
		int count=0;
		for (int i=2;i<st.length()-1;i++)
			if (st.charAt(i)=='C') count++;
		if (count!=1) {
			ok = false;
		}
		
		for (int i=1;i<st.length();i++)
			if (st.charAt(i)!='C' && st.charAt(i)!=st.toLowerCase().charAt(i)) {
				ok = false;
			}
		
		if (ok) System.out.println("AC");
		else System.out.println("WA");

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean ok = true;
		if (st.charAt(0)!='A') ok = false;
		int count=0;
		for (int i=2;i<st.length()-1;i++)
			if (st.charAt(i)=='C') count++;
		if (count!=1) {
			ok = false;
		}
		
		for (int i=1;i<st.length();i++)
			if (st.charAt(i)!='C' && st.charAt(i)!=st.toLowerCase().charAt(i)) {
				ok = false;
			}
		
		if (ok) System.out.println("AC");
		else System.out.println("WA");

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean ok = true;
		if (st.charAt(0)!='A') ok = false;
		int count=0;
		for (int i=2;i<st.length()-1;i++)
			if (st.charAt(i)=='C') count++;
		if (count!=1) {
			ok = false;
		}
		
		for (int i=1;i<st.length();i++)
			if (st.charAt(i)!='C' && st.charAt(i)!=st.toLowerCase().charAt(i)) {
				ok = false;
			}
		
		if (ok) System.out.println("AC");
		else System.out.println("WA");

	} main {
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean ok = true;
		if (st.charAt(0)!='A') ok = false;
		int count=0;
		for (int i=2;i<st.length()-1;i++)
			if (st.charAt(i)=='C') count++;
		if (count!=1) {
			ok = false;
		}
		
		for (int i=1;i<st.length();i++)
			if (st.charAt(i)!='C' && st.charAt(i)!=st.toLowerCase().charAt(i)) {
				ok = false;
			}
		
		if (ok) System.out.println("AC");
		else System.out.println("WA");

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String st = sc.next(); st sc.next() sc.next sc boolean ok = true; ok true if (st.charAt(0)!='A') ok = false; st.charAt(0)!='A' st.charAt(0) st.charAt st 0 'A' ok = false ok false int count=0; count 0 for (int i=2;i<st.length()-1;i++)
			if (st.charAt(i)=='C') count++; int i=2; int i=2; i 2 i<st.length()-1 i st.length()-1 st.length() st.length st 1 i++ i++ i if (st.charAt(i)=='C') count++; if (st.charAt(i)=='C') count++; st.charAt(i)=='C' st.charAt(i) st.charAt st i 'C' count++ count if (count!=1) {
			ok = false;
		} count!=1 count 1 {
			ok = false;
		} ok = false ok false for (int i=1;i<st.length();i++)
			if (st.charAt(i)!='C' && st.charAt(i)!=st.toLowerCase().charAt(i)) {
				ok = false;
			} int i=1; int i=1; i 1 i<st.length() i st.length() st.length st i++ i++ i if (st.charAt(i)!='C' && st.charAt(i)!=st.toLowerCase().charAt(i)) {
				ok = false;
			} if (st.charAt(i)!='C' && st.charAt(i)!=st.toLowerCase().charAt(i)) {
				ok = false;
			} st.charAt(i)!='C' && st.charAt(i)!=st.toLowerCase().charAt(i) st.charAt(i)!='C' st.charAt(i) st.charAt st i 'C' st.charAt(i)!=st.toLowerCase().charAt(i) st.charAt(i) st.charAt st i st.toLowerCase().charAt(i) st.toLowerCase().charAt st.toLowerCase() st.toLowerCase st i {
				ok = false;
			} ok = false ok false if (ok) System.out.println("AC");
		else System.out.println("WA"); ok 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 public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean ok = true;
		if (st.charAt(0)!='A') ok = false;
		int count=0;
		for (int i=2;i<st.length()-1;i++)
			if (st.charAt(i)=='C') count++;
		if (count!=1) {
			ok = false;
		}
		
		for (int i=1;i<st.length();i++)
			if (st.charAt(i)!='C' && st.charAt(i)!=st.toLowerCase().charAt(i)) {
				ok = false;
			}
		
		if (ok) System.out.println("AC");
		else System.out.println("WA");

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean ok = true;
		if (st.charAt(0)!='A') ok = false;
		int count=0;
		for (int i=2;i<st.length()-1;i++)
			if (st.charAt(i)=='C') count++;
		if (count!=1) {
			ok = false;
		}
		
		for (int i=1;i<st.length();i++)
			if (st.charAt(i)!='C' && st.charAt(i)!=st.toLowerCase().charAt(i)) {
				ok = false;
			}
		
		if (ok) System.out.println("AC");
		else System.out.println("WA");

	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean ok = true;
		if (st.charAt(0)!='A') ok = false;
		int count=0;
		for (int i=2;i<st.length()-1;i++)
			if (st.charAt(i)=='C') count++;
		if (count!=1) {
			ok = false;
		}
		
		for (int i=1;i<st.length();i++)
			if (st.charAt(i)!='C' && st.charAt(i)!=st.toLowerCase().charAt(i)) {
				ok = false;
			}
		
		if (ok) System.out.println("AC");
		else System.out.println("WA");

	}
}
