import java.util.Scanner;

class Main{

	static char[][] map;
	static int H;
	static int W;

	public static void main(String[] args) {



		Scanner sc = new Scanner(System.in);			//文字の入力
		String string = sc.next();
		if(string.charAt(0) != 'A'){
			System.out.println("WA");
			return;

		}
		int c = 0;
		for(int i= 2;i < string.length()-1;i++){
			if(string.charAt(i) == 'C'){
				c++;
			}
		}
		for(int i = 1;i < string.length()-1;i++){
			if(Character.isUpperCase( string.charAt(i)) && string.charAt(i) != 'C'){
				System.out.println("WA");
				return;

			}
		}


		if(c != 1){
			System.out.println("WA");
			return;

		}

		if(Character.isUpperCase( string.charAt(string.length()-1) )){

			System.out.println("WA");
			return;

		}
		System.out.println("AC");


	}
}


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

	static char[][] map;
	static int H;
	static int W;

	public static void main(String[] args) {



		Scanner sc = new Scanner(System.in);			//文字の入力
		String string = sc.next();
		if(string.charAt(0) != 'A'){
			System.out.println("WA");
			return;

		}
		int c = 0;
		for(int i= 2;i < string.length()-1;i++){
			if(string.charAt(i) == 'C'){
				c++;
			}
		}
		for(int i = 1;i < string.length()-1;i++){
			if(Character.isUpperCase( string.charAt(i)) && string.charAt(i) != 'C'){
				System.out.println("WA");
				return;

			}
		}


		if(c != 1){
			System.out.println("WA");
			return;

		}

		if(Character.isUpperCase( string.charAt(string.length()-1) )){

			System.out.println("WA");
			return;

		}
		System.out.println("AC");


	}
} Main static char[][] map; map static int H; H static int W; W public static void main(String[] args) {



		Scanner sc = new Scanner(System.in);			//文字の入力
		String string = sc.next();
		if(string.charAt(0) != 'A'){
			System.out.println("WA");
			return;

		}
		int c = 0;
		for(int i= 2;i < string.length()-1;i++){
			if(string.charAt(i) == 'C'){
				c++;
			}
		}
		for(int i = 1;i < string.length()-1;i++){
			if(Character.isUpperCase( string.charAt(i)) && string.charAt(i) != 'C'){
				System.out.println("WA");
				return;

			}
		}


		if(c != 1){
			System.out.println("WA");
			return;

		}

		if(Character.isUpperCase( string.charAt(string.length()-1) )){

			System.out.println("WA");
			return;

		}
		System.out.println("AC");


	} main {



		Scanner sc = new Scanner(System.in);			//文字の入力
		String string = sc.next();
		if(string.charAt(0) != 'A'){
			System.out.println("WA");
			return;

		}
		int c = 0;
		for(int i= 2;i < string.length()-1;i++){
			if(string.charAt(i) == 'C'){
				c++;
			}
		}
		for(int i = 1;i < string.length()-1;i++){
			if(Character.isUpperCase( string.charAt(i)) && string.charAt(i) != 'C'){
				System.out.println("WA");
				return;

			}
		}


		if(c != 1){
			System.out.println("WA");
			return;

		}

		if(Character.isUpperCase( string.charAt(string.length()-1) )){

			System.out.println("WA");
			return;

		}
		System.out.println("AC");


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String string = sc.next(); string sc.next() sc.next sc if(string.charAt(0) != 'A'){
			System.out.println("WA");
			return;

		} string.charAt(0) != 'A' string.charAt(0) string.charAt string 0 'A' {
			System.out.println("WA");
			return;

		} System.out.println("WA") System.out.println System.out System System.out "WA" return; int c = 0; c 0 for(int i= 2;i < string.length()-1;i++){
			if(string.charAt(i) == 'C'){
				c++;
			}
		} int i= 2; int i= 2; i 2 i < string.length()-1 i string.length()-1 string.length() string.length string 1 i++ i++ i {
			if(string.charAt(i) == 'C'){
				c++;
			}
		} {
			if(string.charAt(i) == 'C'){
				c++;
			}
		} if(string.charAt(i) == 'C'){
				c++;
			} string.charAt(i) == 'C' string.charAt(i) string.charAt string i 'C' {
				c++;
			} c++ c for(int i = 1;i < string.length()-1;i++){
			if(Character.isUpperCase( string.charAt(i)) && string.charAt(i) != 'C'){
				System.out.println("WA");
				return;

			}
		} int i = 1; int i = 1; i 1 i < string.length()-1 i string.length()-1 string.length() string.length string 1 i++ i++ i {
			if(Character.isUpperCase( string.charAt(i)) && string.charAt(i) != 'C'){
				System.out.println("WA");
				return;

			}
		} {
			if(Character.isUpperCase( string.charAt(i)) && string.charAt(i) != 'C'){
				System.out.println("WA");
				return;

			}
		} if(Character.isUpperCase( string.charAt(i)) && string.charAt(i) != 'C'){
				System.out.println("WA");
				return;

			} Character.isUpperCase( string.charAt(i)) && string.charAt(i) != 'C' Character.isUpperCase( string.charAt(i)) Character.isUpperCase Character string.charAt(i) string.charAt string i string.charAt(i) != 'C' string.charAt(i) string.charAt string i 'C' {
				System.out.println("WA");
				return;

			} System.out.println("WA") System.out.println System.out System System.out "WA" return; if(c != 1){
			System.out.println("WA");
			return;

		} c != 1 c 1 {
			System.out.println("WA");
			return;

		} System.out.println("WA") System.out.println System.out System System.out "WA" return; if(Character.isUpperCase( string.charAt(string.length()-1) )){

			System.out.println("WA");
			return;

		} Character.isUpperCase( string.charAt(string.length()-1) ) Character.isUpperCase Character string.charAt(string.length()-1) string.charAt string string.length()-1 string.length() string.length string 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" String[] args args
import java.util.Scanner;

class Main{

	static char[][] map;
	static int H;
	static int W;

	public static void main(String[] args) {



		Scanner sc = new Scanner(System.in);			//文字の入力
		String string = sc.next();
		if(string.charAt(0) != 'A'){
			System.out.println("WA");
			return;

		}
		int c = 0;
		for(int i= 2;i < string.length()-1;i++){
			if(string.charAt(i) == 'C'){
				c++;
			}
		}
		for(int i = 1;i < string.length()-1;i++){
			if(Character.isUpperCase( string.charAt(i)) && string.charAt(i) != 'C'){
				System.out.println("WA");
				return;

			}
		}


		if(c != 1){
			System.out.println("WA");
			return;

		}

		if(Character.isUpperCase( string.charAt(string.length()-1) )){

			System.out.println("WA");
			return;

		}
		System.out.println("AC");


	}
}



