import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.next();
		scanner.close();

		if(input.toCharArray()[0] != 'A') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[input.length() - 1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() == input.length()) {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() < input.length() - 1) {
			System.out.print("WA");
			return;
		}
		if(!input.toLowerCase().equals(input.replaceAll("A","a").replaceAll("C","c"))) {
			System.out.print("WA");
			return;
		}
		System.out.print("AC");
	}
	
} import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.next();
		scanner.close();

		if(input.toCharArray()[0] != 'A') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[input.length() - 1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() == input.length()) {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() < input.length() - 1) {
			System.out.print("WA");
			return;
		}
		if(!input.toLowerCase().equals(input.replaceAll("A","a").replaceAll("C","c"))) {
			System.out.print("WA");
			return;
		}
		System.out.print("AC");
	}
	
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.next();
		scanner.close();

		if(input.toCharArray()[0] != 'A') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[input.length() - 1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() == input.length()) {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() < input.length() - 1) {
			System.out.print("WA");
			return;
		}
		if(!input.toLowerCase().equals(input.replaceAll("A","a").replaceAll("C","c"))) {
			System.out.print("WA");
			return;
		}
		System.out.print("AC");
	} main {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.next();
		scanner.close();

		if(input.toCharArray()[0] != 'A') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[input.length() - 1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() == input.length()) {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() < input.length() - 1) {
			System.out.print("WA");
			return;
		}
		if(!input.toLowerCase().equals(input.replaceAll("A","a").replaceAll("C","c"))) {
			System.out.print("WA");
			return;
		}
		System.out.print("AC");
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.next(); input scanner.next() scanner.next scanner scanner.close() scanner.close scanner if(input.toCharArray()[0] != 'A') {
			System.out.print("WA");
			return;
		} input.toCharArray()[0] != 'A' input.toCharArray()[0] input.toCharArray() input.toCharArray input 0 'A' {
			System.out.print("WA");
			return;
		} System.out.print("WA") System.out.print System.out System System.out "WA" return; if(input.toCharArray()[1] == 'C') {
			System.out.print("WA");
			return;
		} input.toCharArray()[1] == 'C' input.toCharArray()[1] input.toCharArray() input.toCharArray input 1 'C' {
			System.out.print("WA");
			return;
		} System.out.print("WA") System.out.print System.out System System.out "WA" return; if(input.toCharArray()[input.length() - 1] == 'C') {
			System.out.print("WA");
			return;
		} input.toCharArray()[input.length() - 1] == 'C' input.toCharArray()[input.length() - 1] input.toCharArray() input.toCharArray input input.length() - 1 input.length() input.length input 1 'C' {
			System.out.print("WA");
			return;
		} System.out.print("WA") System.out.print System.out System System.out "WA" return; if(input.replaceAll("C","").length() == input.length()) {
			System.out.print("WA");
			return;
		} input.replaceAll("C","").length() == input.length() input.replaceAll("C","").length() input.replaceAll("C","").length input.replaceAll("C","") input.replaceAll input "C" "" input.length() input.length input {
			System.out.print("WA");
			return;
		} System.out.print("WA") System.out.print System.out System System.out "WA" return; if(input.replaceAll("C","").length() < input.length() - 1) {
			System.out.print("WA");
			return;
		} input.replaceAll("C","").length() < input.length() - 1 input.replaceAll("C","").length() input.replaceAll("C","").length input.replaceAll("C","") input.replaceAll input "C" "" input.length() - 1 input.length() input.length input 1 {
			System.out.print("WA");
			return;
		} System.out.print("WA") System.out.print System.out System System.out "WA" return; if(!input.toLowerCase().equals(input.replaceAll("A","a").replaceAll("C","c"))) {
			System.out.print("WA");
			return;
		} !input.toLowerCase().equals(input.replaceAll("A","a").replaceAll("C","c")) input.toLowerCase().equals(input.replaceAll("A","a").replaceAll("C","c")) input.toLowerCase().equals input.toLowerCase() input.toLowerCase input input.replaceAll("A","a").replaceAll("C","c") input.replaceAll("A","a").replaceAll input.replaceAll("A","a") input.replaceAll input "A" "a" "C" "c" {
			System.out.print("WA");
			return;
		} System.out.print("WA") System.out.print System.out System System.out "WA" return; System.out.print("AC") System.out.print System.out System System.out "AC" String[] args args public class Main {
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.next();
		scanner.close();

		if(input.toCharArray()[0] != 'A') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[input.length() - 1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() == input.length()) {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() < input.length() - 1) {
			System.out.print("WA");
			return;
		}
		if(!input.toLowerCase().equals(input.replaceAll("A","a").replaceAll("C","c"))) {
			System.out.print("WA");
			return;
		}
		System.out.print("AC");
	}
	
} public class Main {
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.next();
		scanner.close();

		if(input.toCharArray()[0] != 'A') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[input.length() - 1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() == input.length()) {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() < input.length() - 1) {
			System.out.print("WA");
			return;
		}
		if(!input.toLowerCase().equals(input.replaceAll("A","a").replaceAll("C","c"))) {
			System.out.print("WA");
			return;
		}
		System.out.print("AC");
	}
	
} Main
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.next();
		scanner.close();

		if(input.toCharArray()[0] != 'A') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.toCharArray()[input.length() - 1] == 'C') {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() == input.length()) {
			System.out.print("WA");
			return;
		}
		if(input.replaceAll("C","").length() < input.length() - 1) {
			System.out.print("WA");
			return;
		}
		if(!input.toLowerCase().equals(input.replaceAll("A","a").replaceAll("C","c"))) {
			System.out.print("WA");
			return;
		}
		System.out.print("AC");
	}
	
}