import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;



/*Atcoder用
 * 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] abc = br.readLine().split(" ");
		int a = Integer.parseInt(abc[0]);
		int b = Integer.parseInt(abc[1]);
		int c = Integer.parseInt(abc[2]);


		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();
		for(char c:s)System.out.println(c);
 */


public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();


		if(s[0] != 'A'){
			System.out.println("WA");
			System.exit(0);
		}
		if(s[1] == 'C' || s[s.length-1] == 'C'){
			System.out.println("WA");
			System.exit(0);
		}

		int k = s[1];
		int j = s[s.length-1];

		if(k<91||j<91){
			System.out.println("WA");
			System.exit(0);
		}

		boolean isCExist = false;
		for(int x = 2;x < s.length-1;x++){
			int asc = s[x];

			if(asc == 67){
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			}
			else if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			}

		}

		if(isCExist)System.out.println("AC");
		else System.out.println("WA");
	}


} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();


		if(s[0] != 'A'){
			System.out.println("WA");
			System.exit(0);
		}
		if(s[1] == 'C' || s[s.length-1] == 'C'){
			System.out.println("WA");
			System.exit(0);
		}

		int k = s[1];
		int j = s[s.length-1];

		if(k<91||j<91){
			System.out.println("WA");
			System.exit(0);
		}

		boolean isCExist = false;
		for(int x = 2;x < s.length-1;x++){
			int asc = s[x];

			if(asc == 67){
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			}
			else if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			}

		}

		if(isCExist)System.out.println("AC");
		else System.out.println("WA");
	}


} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();


		if(s[0] != 'A'){
			System.out.println("WA");
			System.exit(0);
		}
		if(s[1] == 'C' || s[s.length-1] == 'C'){
			System.out.println("WA");
			System.exit(0);
		}

		int k = s[1];
		int j = s[s.length-1];

		if(k<91||j<91){
			System.out.println("WA");
			System.exit(0);
		}

		boolean isCExist = false;
		for(int x = 2;x < s.length-1;x++){
			int asc = s[x];

			if(asc == 67){
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			}
			else if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			}

		}

		if(isCExist)System.out.println("AC");
		else System.out.println("WA");
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();


		if(s[0] != 'A'){
			System.out.println("WA");
			System.exit(0);
		}
		if(s[1] == 'C' || s[s.length-1] == 'C'){
			System.out.println("WA");
			System.exit(0);
		}

		int k = s[1];
		int j = s[s.length-1];

		if(k<91||j<91){
			System.out.println("WA");
			System.exit(0);
		}

		boolean isCExist = false;
		for(int x = 2;x < s.length-1;x++){
			int asc = s[x];

			if(asc == 67){
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			}
			else if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			}

		}

		if(isCExist)System.out.println("AC");
		else System.out.println("WA");
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String get = br.readLine(); get br.readLine() br.readLine br char[] s = get.toCharArray(); s get.toCharArray() get.toCharArray get if(s[0] != 'A'){
			System.out.println("WA");
			System.exit(0);
		} s[0] != 'A' s[0] s 0 'A' {
			System.out.println("WA");
			System.exit(0);
		} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 if(s[1] == 'C' || s[s.length-1] == 'C'){
			System.out.println("WA");
			System.exit(0);
		} s[1] == 'C' || s[s.length-1] == 'C' s[1] == 'C' s[1] s 1 'C' s[s.length-1] == 'C' s[s.length-1] s s.length-1 s.length s s.length 1 'C' {
			System.out.println("WA");
			System.exit(0);
		} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 int k = s[1]; k s[1] s 1 int j = s[s.length-1]; j s[s.length-1] s s.length-1 s.length s s.length 1 if(k<91||j<91){
			System.out.println("WA");
			System.exit(0);
		} k<91||j<91 k<91 k 91 j<91 j 91 {
			System.out.println("WA");
			System.exit(0);
		} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 boolean isCExist = false; isCExist false for(int x = 2;x < s.length-1;x++){
			int asc = s[x];

			if(asc == 67){
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			}
			else if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			}

		} int x = 2; int x = 2; x 2 x < s.length-1 x s.length-1 s.length s s.length 1 x++ x++ x {
			int asc = s[x];

			if(asc == 67){
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			}
			else if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			}

		} {
			int asc = s[x];

			if(asc == 67){
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			}
			else if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			}

		} int asc = s[x]; asc s[x] s x if(asc == 67){
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			}
			else if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			} asc == 67 asc 67 {
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			} if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true; isCExist {
					System.out.println("WA");
					System.exit(0);
				} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 isCExist = true isCExist true if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			} asc < 91 asc 91 {
				System.out.println("WA");
				System.exit(0);
			} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 if(isCExist)System.out.println("AC");
		else System.out.println("WA"); isCExist System.out.println("AC") System.out.println System.out System System.out "AC" System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();


		if(s[0] != 'A'){
			System.out.println("WA");
			System.exit(0);
		}
		if(s[1] == 'C' || s[s.length-1] == 'C'){
			System.out.println("WA");
			System.exit(0);
		}

		int k = s[1];
		int j = s[s.length-1];

		if(k<91||j<91){
			System.out.println("WA");
			System.exit(0);
		}

		boolean isCExist = false;
		for(int x = 2;x < s.length-1;x++){
			int asc = s[x];

			if(asc == 67){
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			}
			else if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			}

		}

		if(isCExist)System.out.println("AC");
		else System.out.println("WA");
	}


} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();


		if(s[0] != 'A'){
			System.out.println("WA");
			System.exit(0);
		}
		if(s[1] == 'C' || s[s.length-1] == 'C'){
			System.out.println("WA");
			System.exit(0);
		}

		int k = s[1];
		int j = s[s.length-1];

		if(k<91||j<91){
			System.out.println("WA");
			System.exit(0);
		}

		boolean isCExist = false;
		for(int x = 2;x < s.length-1;x++){
			int asc = s[x];

			if(asc == 67){
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			}
			else if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			}

		}

		if(isCExist)System.out.println("AC");
		else System.out.println("WA");
	}


} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;



/*Atcoder用
 * 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] abc = br.readLine().split(" ");
		int a = Integer.parseInt(abc[0]);
		int b = Integer.parseInt(abc[1]);
		int c = Integer.parseInt(abc[2]);


		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();
		for(char c:s)System.out.println(c);
 */


public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();


		if(s[0] != 'A'){
			System.out.println("WA");
			System.exit(0);
		}
		if(s[1] == 'C' || s[s.length-1] == 'C'){
			System.out.println("WA");
			System.exit(0);
		}

		int k = s[1];
		int j = s[s.length-1];

		if(k<91||j<91){
			System.out.println("WA");
			System.exit(0);
		}

		boolean isCExist = false;
		for(int x = 2;x < s.length-1;x++){
			int asc = s[x];

			if(asc == 67){
				if(isCExist){
					System.out.println("WA");
					System.exit(0);
				}
				else isCExist = true;
			}
			else if(asc < 91){
				System.out.println("WA");
				System.exit(0);
			}

		}

		if(isCExist)System.out.println("AC");
		else System.out.println("WA");
	}


}
