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