import java.util.*;
 
public class Main{
	static Scanner in = new Scanner(System.in);
		// int n = in.nextInt();
		// int[] a = new int[n];
		// for(int i = 0; i<n; i++){
		// 	a[i] = in.nextInt();
		// }

		// int min = Integer.MAX_VALUE;
  		// int max = Integer.MIN_VALUE;
 	
	public static void main(String[] args) {
		//zhan
		//dos
		//md
		int test = 1;
		while(test>0){
			solve();
			test--;
		}
	}

	public static void solve(){
		String str = in.next();
		for(char c: str.toCharArray()){
			if(c == 'A') continue;
			if(c == 'C') continue;

			if(Character.isUpperCase(c)){
				System.out.println("WA");
				return;
			}
		}
		if(str.charAt(0) != 'A'){
			System.out.println("WA");
		}else if(str.indexOf("C") == str.lastIndexOf("C") && (str.indexOf("C")>=2 && str.indexOf("C")<=str.length()-2)){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	}
} import java.util.*; util.* java public class Main{
	static Scanner in = new Scanner(System.in);
		// int n = in.nextInt();
		// int[] a = new int[n];
		// for(int i = 0; i<n; i++){
		// 	a[i] = in.nextInt();
		// }

		// int min = Integer.MAX_VALUE;
  		// int max = Integer.MIN_VALUE;
 	
	public static void main(String[] args) {
		//zhan
		//dos
		//md
		int test = 1;
		while(test>0){
			solve();
			test--;
		}
	}

	public static void solve(){
		String str = in.next();
		for(char c: str.toCharArray()){
			if(c == 'A') continue;
			if(c == 'C') continue;

			if(Character.isUpperCase(c)){
				System.out.println("WA");
				return;
			}
		}
		if(str.charAt(0) != 'A'){
			System.out.println("WA");
		}else if(str.indexOf("C") == str.lastIndexOf("C") && (str.indexOf("C")>=2 && str.indexOf("C")<=str.length()-2)){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	}
} Main static Scanner in = new Scanner(System.in); in new Scanner(System.in) public static void main(String[] args) {
		//zhan
		//dos
		//md
		int test = 1;
		while(test>0){
			solve();
			test--;
		}
	} main {
		//zhan
		//dos
		//md
		int test = 1;
		while(test>0){
			solve();
			test--;
		}
	} int test = 1; test 1 while(test>0){
			solve();
			test--;
		} test>0 test 0 {
			solve();
			test--;
		} solve() solve test-- test String[] args args public static void solve(){
		String str = in.next();
		for(char c: str.toCharArray()){
			if(c == 'A') continue;
			if(c == 'C') continue;

			if(Character.isUpperCase(c)){
				System.out.println("WA");
				return;
			}
		}
		if(str.charAt(0) != 'A'){
			System.out.println("WA");
		}else if(str.indexOf("C") == str.lastIndexOf("C") && (str.indexOf("C")>=2 && str.indexOf("C")<=str.length()-2)){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	} solve {
		String str = in.next();
		for(char c: str.toCharArray()){
			if(c == 'A') continue;
			if(c == 'C') continue;

			if(Character.isUpperCase(c)){
				System.out.println("WA");
				return;
			}
		}
		if(str.charAt(0) != 'A'){
			System.out.println("WA");
		}else if(str.indexOf("C") == str.lastIndexOf("C") && (str.indexOf("C")>=2 && str.indexOf("C")<=str.length()-2)){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	} String str = in.next(); str in.next() in.next in for(char c: str.toCharArray()){
			if(c == 'A') continue;
			if(c == 'C') continue;

			if(Character.isUpperCase(c)){
				System.out.println("WA");
				return;
			}
		} char c str.toCharArray() str.toCharArray str {
			if(c == 'A') continue;
			if(c == 'C') continue;

			if(Character.isUpperCase(c)){
				System.out.println("WA");
				return;
			}
		} {
			if(c == 'A') continue;
			if(c == 'C') continue;

			if(Character.isUpperCase(c)){
				System.out.println("WA");
				return;
			}
		} if(c == 'A') continue; c == 'A' c 'A' continue; if(c == 'C') continue; c == 'C' c 'C' continue; if(Character.isUpperCase(c)){
				System.out.println("WA");
				return;
			} Character.isUpperCase(c) Character.isUpperCase Character c {
				System.out.println("WA");
				return;
			} System.out.println("WA") System.out.println System.out System System.out "WA" return; if(str.charAt(0) != 'A'){
			System.out.println("WA");
		}else if(str.indexOf("C") == str.lastIndexOf("C") && (str.indexOf("C")>=2 && str.indexOf("C")<=str.length()-2)){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		} str.charAt(0) != 'A' str.charAt(0) str.charAt str 0 'A' {
			System.out.println("WA");
		} System.out.println("WA") System.out.println System.out System System.out "WA" if(str.indexOf("C") == str.lastIndexOf("C") && (str.indexOf("C")>=2 && str.indexOf("C")<=str.length()-2)){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		} str.indexOf("C") == str.lastIndexOf("C") && (str.indexOf("C")>=2 && str.indexOf("C")<=str.length()-2) str.indexOf("C") == str.lastIndexOf("C") str.indexOf("C") str.indexOf str "C" str.lastIndexOf("C") str.lastIndexOf str "C" (str.indexOf("C")>=2 && str.indexOf("C")<=str.length()-2) str.indexOf("C")>=2 str.indexOf("C") str.indexOf str "C" 2 str.indexOf("C")<=str.length()-2 str.indexOf("C") str.indexOf str "C" str.length()-2 str.length() str.length str 2 {
			System.out.println("AC");
		} System.out.println("AC") System.out.println System.out System System.out "AC" {
			System.out.println("WA");
		} System.out.println("WA") System.out.println System.out System System.out "WA" public class Main{
	static Scanner in = new Scanner(System.in);
		// int n = in.nextInt();
		// int[] a = new int[n];
		// for(int i = 0; i<n; i++){
		// 	a[i] = in.nextInt();
		// }

		// int min = Integer.MAX_VALUE;
  		// int max = Integer.MIN_VALUE;
 	
	public static void main(String[] args) {
		//zhan
		//dos
		//md
		int test = 1;
		while(test>0){
			solve();
			test--;
		}
	}

	public static void solve(){
		String str = in.next();
		for(char c: str.toCharArray()){
			if(c == 'A') continue;
			if(c == 'C') continue;

			if(Character.isUpperCase(c)){
				System.out.println("WA");
				return;
			}
		}
		if(str.charAt(0) != 'A'){
			System.out.println("WA");
		}else if(str.indexOf("C") == str.lastIndexOf("C") && (str.indexOf("C")>=2 && str.indexOf("C")<=str.length()-2)){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	}
} public class Main{
	static Scanner in = new Scanner(System.in);
		// int n = in.nextInt();
		// int[] a = new int[n];
		// for(int i = 0; i<n; i++){
		// 	a[i] = in.nextInt();
		// }

		// int min = Integer.MAX_VALUE;
  		// int max = Integer.MIN_VALUE;
 	
	public static void main(String[] args) {
		//zhan
		//dos
		//md
		int test = 1;
		while(test>0){
			solve();
			test--;
		}
	}

	public static void solve(){
		String str = in.next();
		for(char c: str.toCharArray()){
			if(c == 'A') continue;
			if(c == 'C') continue;

			if(Character.isUpperCase(c)){
				System.out.println("WA");
				return;
			}
		}
		if(str.charAt(0) != 'A'){
			System.out.println("WA");
		}else if(str.indexOf("C") == str.lastIndexOf("C") && (str.indexOf("C")>=2 && str.indexOf("C")<=str.length()-2)){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	}
} Main
import java.util.*;
 
public class Main{
	static Scanner in = new Scanner(System.in);
		// int n = in.nextInt();
		// int[] a = new int[n];
		// for(int i = 0; i<n; i++){
		// 	a[i] = in.nextInt();
		// }

		// int min = Integer.MAX_VALUE;
  		// int max = Integer.MIN_VALUE;
 	
	public static void main(String[] args) {
		//zhan
		//dos
		//md
		int test = 1;
		while(test>0){
			solve();
			test--;
		}
	}

	public static void solve(){
		String str = in.next();
		for(char c: str.toCharArray()){
			if(c == 'A') continue;
			if(c == 'C') continue;

			if(Character.isUpperCase(c)){
				System.out.println("WA");
				return;
			}
		}
		if(str.charAt(0) != 'A'){
			System.out.println("WA");
		}else if(str.indexOf("C") == str.lastIndexOf("C") && (str.indexOf("C")>=2 && str.indexOf("C")<=str.length()-2)){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	}
}