import java.util.*;
import java.util.stream.*;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(s.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}
		if(s.length() < 4) {
			System.out.println("WA");
			return;
		}
		String tmp = s.substring(2, s.length()-1);
		// System.out.println(tmp);
		if(tmp.replaceAll("C", "").length() != tmp.length() - 1) {
			System.out.println("WA");
			return;
		}
		if(s.replaceAll("C", "").length() != s.length() - 1) {
			System.out.println("WA");
			return;
		}
		for(char ch : s.toCharArray()) {
			if(ch == 'A' || ch == 'C') {
				continue;
			}
			if(!Character.isLowerCase(ch)) {
				System.out.println("WA");
				return;
			}
		}
		System.out.println("AC");
	}
} import java.util.*; util.* java import java.util.stream.*; stream.* java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(s.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}
		if(s.length() < 4) {
			System.out.println("WA");
			return;
		}
		String tmp = s.substring(2, s.length()-1);
		// System.out.println(tmp);
		if(tmp.replaceAll("C", "").length() != tmp.length() - 1) {
			System.out.println("WA");
			return;
		}
		if(s.replaceAll("C", "").length() != s.length() - 1) {
			System.out.println("WA");
			return;
		}
		for(char ch : s.toCharArray()) {
			if(ch == 'A' || ch == 'C') {
				continue;
			}
			if(!Character.isLowerCase(ch)) {
				System.out.println("WA");
				return;
			}
		}
		System.out.println("AC");
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(s.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}
		if(s.length() < 4) {
			System.out.println("WA");
			return;
		}
		String tmp = s.substring(2, s.length()-1);
		// System.out.println(tmp);
		if(tmp.replaceAll("C", "").length() != tmp.length() - 1) {
			System.out.println("WA");
			return;
		}
		if(s.replaceAll("C", "").length() != s.length() - 1) {
			System.out.println("WA");
			return;
		}
		for(char ch : s.toCharArray()) {
			if(ch == 'A' || ch == 'C') {
				continue;
			}
			if(!Character.isLowerCase(ch)) {
				System.out.println("WA");
				return;
			}
		}
		System.out.println("AC");
	} main {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(s.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}
		if(s.length() < 4) {
			System.out.println("WA");
			return;
		}
		String tmp = s.substring(2, s.length()-1);
		// System.out.println(tmp);
		if(tmp.replaceAll("C", "").length() != tmp.length() - 1) {
			System.out.println("WA");
			return;
		}
		if(s.replaceAll("C", "").length() != s.length() - 1) {
			System.out.println("WA");
			return;
		}
		for(char ch : s.toCharArray()) {
			if(ch == 'A' || ch == 'C') {
				continue;
			}
			if(!Character.isLowerCase(ch)) {
				System.out.println("WA");
				return;
			}
		}
		System.out.println("AC");
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.nextLine(); s in.nextLine() in.nextLine in 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; if(s.length() < 4) {
			System.out.println("WA");
			return;
		} s.length() < 4 s.length() s.length s 4 {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; String tmp = s.substring(2, s.length()-1); tmp s.substring(2, s.length()-1) s.substring s 2 s.length()-1 s.length() s.length s 1 if(tmp.replaceAll("C", "").length() != tmp.length() - 1) {
			System.out.println("WA");
			return;
		} tmp.replaceAll("C", "").length() != tmp.length() - 1 tmp.replaceAll("C", "").length() tmp.replaceAll("C", "").length tmp.replaceAll("C", "") tmp.replaceAll tmp "C" "" tmp.length() - 1 tmp.length() tmp.length tmp 1 {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; if(s.replaceAll("C", "").length() != s.length() - 1) {
			System.out.println("WA");
			return;
		} s.replaceAll("C", "").length() != s.length() - 1 s.replaceAll("C", "").length() s.replaceAll("C", "").length s.replaceAll("C", "") s.replaceAll s "C" "" 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; for(char ch : s.toCharArray()) {
			if(ch == 'A' || ch == 'C') {
				continue;
			}
			if(!Character.isLowerCase(ch)) {
				System.out.println("WA");
				return;
			}
		} char ch s.toCharArray() s.toCharArray s {
			if(ch == 'A' || ch == 'C') {
				continue;
			}
			if(!Character.isLowerCase(ch)) {
				System.out.println("WA");
				return;
			}
		} {
			if(ch == 'A' || ch == 'C') {
				continue;
			}
			if(!Character.isLowerCase(ch)) {
				System.out.println("WA");
				return;
			}
		} if(ch == 'A' || ch == 'C') {
				continue;
			} ch == 'A' || ch == 'C' ch == 'A' ch 'A' ch == 'C' ch 'C' {
				continue;
			} continue; if(!Character.isLowerCase(ch)) {
				System.out.println("WA");
				return;
			} !Character.isLowerCase(ch) Character.isLowerCase(ch) Character.isLowerCase Character ch {
				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" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(s.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}
		if(s.length() < 4) {
			System.out.println("WA");
			return;
		}
		String tmp = s.substring(2, s.length()-1);
		// System.out.println(tmp);
		if(tmp.replaceAll("C", "").length() != tmp.length() - 1) {
			System.out.println("WA");
			return;
		}
		if(s.replaceAll("C", "").length() != s.length() - 1) {
			System.out.println("WA");
			return;
		}
		for(char ch : s.toCharArray()) {
			if(ch == 'A' || ch == 'C') {
				continue;
			}
			if(!Character.isLowerCase(ch)) {
				System.out.println("WA");
				return;
			}
		}
		System.out.println("AC");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(s.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}
		if(s.length() < 4) {
			System.out.println("WA");
			return;
		}
		String tmp = s.substring(2, s.length()-1);
		// System.out.println(tmp);
		if(tmp.replaceAll("C", "").length() != tmp.length() - 1) {
			System.out.println("WA");
			return;
		}
		if(s.replaceAll("C", "").length() != s.length() - 1) {
			System.out.println("WA");
			return;
		}
		for(char ch : s.toCharArray()) {
			if(ch == 'A' || ch == 'C') {
				continue;
			}
			if(!Character.isLowerCase(ch)) {
				System.out.println("WA");
				return;
			}
		}
		System.out.println("AC");
	}
} Main
import java.util.*;
import java.util.stream.*;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		if(s.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}
		if(s.length() < 4) {
			System.out.println("WA");
			return;
		}
		String tmp = s.substring(2, s.length()-1);
		// System.out.println(tmp);
		if(tmp.replaceAll("C", "").length() != tmp.length() - 1) {
			System.out.println("WA");
			return;
		}
		if(s.replaceAll("C", "").length() != s.length() - 1) {
			System.out.println("WA");
			return;
		}
		for(char ch : s.toCharArray()) {
			if(ch == 'A' || ch == 'C') {
				continue;
			}
			if(!Character.isLowerCase(ch)) {
				System.out.println("WA");
				return;
			}
		}
		System.out.println("AC");
	}
}
