import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String S =in.next();
		int count=0;
		boolean flag=S.matches("A[a-z][a-z,C][a-z,C]*[a-z]");
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='C') {
				count++;
			}
		}
		if(count>=2||count==0) {
			flag=false;
		}
		if(flag) {
			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 in = new Scanner(System.in);
		String S =in.next();
		int count=0;
		boolean flag=S.matches("A[a-z][a-z,C][a-z,C]*[a-z]");
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='C') {
				count++;
			}
		}
		if(count>=2||count==0) {
			flag=false;
		}
		if(flag) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
 
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String S =in.next();
		int count=0;
		boolean flag=S.matches("A[a-z][a-z,C][a-z,C]*[a-z]");
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='C') {
				count++;
			}
		}
		if(count>=2||count==0) {
			flag=false;
		}
		if(flag) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
 
	} main {
		Scanner in = new Scanner(System.in);
		String S =in.next();
		int count=0;
		boolean flag=S.matches("A[a-z][a-z,C][a-z,C]*[a-z]");
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='C') {
				count++;
			}
		}
		if(count>=2||count==0) {
			flag=false;
		}
		if(flag) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
 
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) String S =in.next(); S in.next() in.next in int count=0; count 0 boolean flag=S.matches("A[a-z][a-z,C][a-z,C]*[a-z]"); flag S.matches("A[a-z][a-z,C][a-z,C]*[a-z]") S.matches S "A[a-z][a-z,C][a-z,C]*[a-z]" for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='C') {
				count++;
			}
		} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			if(S.charAt(i)=='C') {
				count++;
			}
		} {
			if(S.charAt(i)=='C') {
				count++;
			}
		} if(S.charAt(i)=='C') {
				count++;
			} S.charAt(i)=='C' S.charAt(i) S.charAt S i 'C' {
				count++;
			} count++ count if(count>=2||count==0) {
			flag=false;
		} count>=2||count==0 count>=2 count 2 count==0 count 0 {
			flag=false;
		} flag=false flag false if(flag) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		} flag {
			System.out.println("AC");
		} System.out.println("AC") System.out.println System.out System System.out "AC" {
			System.out.println("WA");
		} 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 in = new Scanner(System.in);
		String S =in.next();
		int count=0;
		boolean flag=S.matches("A[a-z][a-z,C][a-z,C]*[a-z]");
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='C') {
				count++;
			}
		}
		if(count>=2||count==0) {
			flag=false;
		}
		if(flag) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
 
	}
} public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String S =in.next();
		int count=0;
		boolean flag=S.matches("A[a-z][a-z,C][a-z,C]*[a-z]");
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='C') {
				count++;
			}
		}
		if(count>=2||count==0) {
			flag=false;
		}
		if(flag) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
 
	}
} Main
import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String S =in.next();
		int count=0;
		boolean flag=S.matches("A[a-z][a-z,C][a-z,C]*[a-z]");
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='C') {
				count++;
			}
		}
		if(count>=2||count==0) {
			flag=false;
		}
		if(flag) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
 
	}
}