import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String r = sc.nextLine();
		char[] s = r.toCharArray();
		String ans = "AC";
		int i;
		int c=0;
		if((s[0]!='A')||(Character.isUpperCase(s[1]))) {
			ans = "WA";
		}else {
			for(i=2;i<r.length()-1;i++) {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			}
			if(c!=1) {
				ans="WA";
			}else if(Character.isUpperCase(s[r.length()-1])) ans = "WA";
		}
		System.out.println(ans);

	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String r = sc.nextLine();
		char[] s = r.toCharArray();
		String ans = "AC";
		int i;
		int c=0;
		if((s[0]!='A')||(Character.isUpperCase(s[1]))) {
			ans = "WA";
		}else {
			for(i=2;i<r.length()-1;i++) {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			}
			if(c!=1) {
				ans="WA";
			}else if(Character.isUpperCase(s[r.length()-1])) ans = "WA";
		}
		System.out.println(ans);

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String r = sc.nextLine();
		char[] s = r.toCharArray();
		String ans = "AC";
		int i;
		int c=0;
		if((s[0]!='A')||(Character.isUpperCase(s[1]))) {
			ans = "WA";
		}else {
			for(i=2;i<r.length()-1;i++) {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			}
			if(c!=1) {
				ans="WA";
			}else if(Character.isUpperCase(s[r.length()-1])) ans = "WA";
		}
		System.out.println(ans);

	} main {
		Scanner sc = new Scanner(System.in);
		String r = sc.nextLine();
		char[] s = r.toCharArray();
		String ans = "AC";
		int i;
		int c=0;
		if((s[0]!='A')||(Character.isUpperCase(s[1]))) {
			ans = "WA";
		}else {
			for(i=2;i<r.length()-1;i++) {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			}
			if(c!=1) {
				ans="WA";
			}else if(Character.isUpperCase(s[r.length()-1])) ans = "WA";
		}
		System.out.println(ans);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String r = sc.nextLine(); r sc.nextLine() sc.nextLine sc char[] s = r.toCharArray(); s r.toCharArray() r.toCharArray r String ans = "AC"; ans "AC" int i; i int c=0; c 0 if((s[0]!='A')||(Character.isUpperCase(s[1]))) {
			ans = "WA";
		}else {
			for(i=2;i<r.length()-1;i++) {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			}
			if(c!=1) {
				ans="WA";
			}else if(Character.isUpperCase(s[r.length()-1])) ans = "WA";
		} (s[0]!='A')||(Character.isUpperCase(s[1])) (s[0]!='A') s[0] s 0 'A' (Character.isUpperCase(s[1])) Character.isUpperCase Character s[1] s 1 {
			ans = "WA";
		} ans = "WA" ans "WA" {
			for(i=2;i<r.length()-1;i++) {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			}
			if(c!=1) {
				ans="WA";
			}else if(Character.isUpperCase(s[r.length()-1])) ans = "WA";
		} for(i=2;i<r.length()-1;i++) {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			} i=2; i=2 i 2 i<r.length()-1 i r.length()-1 r.length() r.length r 1 i++ i++ i {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			} {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			} if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				} Character.isUpperCase(s[i]) Character.isUpperCase Character s[i] s i {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				} if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					} s[i]!='C' s[i] s i 'C' {
						ans = "WA";
						break;
					} ans = "WA" ans "WA" break; {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					} c++ c if(c>1) {
							ans ="WA";
							break;
						} c>1 c 1 {
							ans ="WA";
							break;
						} ans ="WA" ans "WA" break; if(c!=1) {
				ans="WA";
			}else if(Character.isUpperCase(s[r.length()-1])) ans = "WA"; c!=1 c 1 {
				ans="WA";
			} ans="WA" ans "WA" if(Character.isUpperCase(s[r.length()-1])) ans = "WA"; Character.isUpperCase(s[r.length()-1]) Character.isUpperCase Character s[r.length()-1] s r.length()-1 r.length() r.length r 1 ans = "WA" ans "WA" 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 sc = new Scanner(System.in);
		String r = sc.nextLine();
		char[] s = r.toCharArray();
		String ans = "AC";
		int i;
		int c=0;
		if((s[0]!='A')||(Character.isUpperCase(s[1]))) {
			ans = "WA";
		}else {
			for(i=2;i<r.length()-1;i++) {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			}
			if(c!=1) {
				ans="WA";
			}else if(Character.isUpperCase(s[r.length()-1])) ans = "WA";
		}
		System.out.println(ans);

	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String r = sc.nextLine();
		char[] s = r.toCharArray();
		String ans = "AC";
		int i;
		int c=0;
		if((s[0]!='A')||(Character.isUpperCase(s[1]))) {
			ans = "WA";
		}else {
			for(i=2;i<r.length()-1;i++) {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			}
			if(c!=1) {
				ans="WA";
			}else if(Character.isUpperCase(s[r.length()-1])) ans = "WA";
		}
		System.out.println(ans);

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String r = sc.nextLine();
		char[] s = r.toCharArray();
		String ans = "AC";
		int i;
		int c=0;
		if((s[0]!='A')||(Character.isUpperCase(s[1]))) {
			ans = "WA";
		}else {
			for(i=2;i<r.length()-1;i++) {
				if(Character.isUpperCase(s[i])) {
					if(s[i]!='C') {
						ans = "WA";
						break;
					}else {
						c++;
						if(c>1) {
							ans ="WA";
							break;
						}
					}
				}
			}
			if(c!=1) {
				ans="WA";
			}else if(Character.isUpperCase(s[r.length()-1])) ans = "WA";
		}
		System.out.println(ans);

	}
}