import java.util.*;

public class Main{

	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String ans[] = {"AC", "WA"};
		int an = 0;
		int n = s.length();
		int count = 0;
		if(s.charAt(0) != 'A')an = 1;
		for(int i = 1; i < n; ++i){
			if(Character.isUpperCase(s.charAt(i))){
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			}
		}
		if(count == 0)an = 1;
		System.out.println(ans[an]);
	}
} import java.util.*; util.* java public class Main{

	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String ans[] = {"AC", "WA"};
		int an = 0;
		int n = s.length();
		int count = 0;
		if(s.charAt(0) != 'A')an = 1;
		for(int i = 1; i < n; ++i){
			if(Character.isUpperCase(s.charAt(i))){
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			}
		}
		if(count == 0)an = 1;
		System.out.println(ans[an]);
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String ans[] = {"AC", "WA"};
		int an = 0;
		int n = s.length();
		int count = 0;
		if(s.charAt(0) != 'A')an = 1;
		for(int i = 1; i < n; ++i){
			if(Character.isUpperCase(s.charAt(i))){
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			}
		}
		if(count == 0)an = 1;
		System.out.println(ans[an]);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String ans[] = {"AC", "WA"};
		int an = 0;
		int n = s.length();
		int count = 0;
		if(s.charAt(0) != 'A')an = 1;
		for(int i = 1; i < n; ++i){
			if(Character.isUpperCase(s.charAt(i))){
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			}
		}
		if(count == 0)an = 1;
		System.out.println(ans[an]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc String ans[] = {"AC", "WA"}; ans {"AC", "WA"} "AC" "WA" int an = 0; an 0 int n = s.length(); n s.length() s.length s int count = 0; count 0 if(s.charAt(0) != 'A')an = 1; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' an = 1 an 1 for(int i = 1; i < n; ++i){
			if(Character.isUpperCase(s.charAt(i))){
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			}
		} int i = 1; int i = 1; i 1 i < n i n ++i ++i i {
			if(Character.isUpperCase(s.charAt(i))){
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			}
		} {
			if(Character.isUpperCase(s.charAt(i))){
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			}
		} if(Character.isUpperCase(s.charAt(i))){
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			} Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			} if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				} i == 1 || i == n - 1 i == 1 i 1 i == n - 1 i n - 1 n 1 {
					an = 1;
					break;
				} an = 1 an 1 break; {
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				} if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					} s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					} if(count >= 1){
							an = 1;
							break;
						} count >= 1 count 1 {
							an = 1;
							break;
						} an = 1 an 1 break; count++ count if(count == 0)an = 1; count == 0 count 0 an = 1 an 1 System.out.println(ans[an]) System.out.println System.out System System.out ans[an] ans an String args[] args public class Main{

	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String ans[] = {"AC", "WA"};
		int an = 0;
		int n = s.length();
		int count = 0;
		if(s.charAt(0) != 'A')an = 1;
		for(int i = 1; i < n; ++i){
			if(Character.isUpperCase(s.charAt(i))){
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			}
		}
		if(count == 0)an = 1;
		System.out.println(ans[an]);
	}
} public class Main{

	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String ans[] = {"AC", "WA"};
		int an = 0;
		int n = s.length();
		int count = 0;
		if(s.charAt(0) != 'A')an = 1;
		for(int i = 1; i < n; ++i){
			if(Character.isUpperCase(s.charAt(i))){
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			}
		}
		if(count == 0)an = 1;
		System.out.println(ans[an]);
	}
} Main
import java.util.*;

public class Main{

	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String ans[] = {"AC", "WA"};
		int an = 0;
		int n = s.length();
		int count = 0;
		if(s.charAt(0) != 'A')an = 1;
		for(int i = 1; i < n; ++i){
			if(Character.isUpperCase(s.charAt(i))){
				if(i == 1 || i == n - 1){
					an = 1;
					break;
				}
				else{
					if(s.charAt(i) == 'C'){
						if(count >= 1){
							an = 1;
							break;
						}
						count++;
					}
				}	
			}
		}
		if(count == 0)an = 1;
		System.out.println(ans[an]);
	}
}