import java.lang.reflect.Array;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String S = sc.next();
		String ans = "";
		if (!S.substring(0,1).equals("A")) {
			System.out.println("WA");
			return;
		}
		int C = 0;
		for (int i = 2; i < S.length()-1; i++) {
			if(S.charAt(i) == 'C'){
				C++;
			}
		}
		if(C!=1){
			System.out.println("WA");
			return;
		}
		if (ans.equals("wa")) {
			return;
		}
		String s = S.substring(1,S.length()).replace('C', 'c');
		if(!s.equals(s.toLowerCase())){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}	
} import java.lang.reflect.Array; Array java.lang.reflect import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String S = sc.next();
		String ans = "";
		if (!S.substring(0,1).equals("A")) {
			System.out.println("WA");
			return;
		}
		int C = 0;
		for (int i = 2; i < S.length()-1; i++) {
			if(S.charAt(i) == 'C'){
				C++;
			}
		}
		if(C!=1){
			System.out.println("WA");
			return;
		}
		if (ans.equals("wa")) {
			return;
		}
		String s = S.substring(1,S.length()).replace('C', 'c');
		if(!s.equals(s.toLowerCase())){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}	
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String S = sc.next();
		String ans = "";
		if (!S.substring(0,1).equals("A")) {
			System.out.println("WA");
			return;
		}
		int C = 0;
		for (int i = 2; i < S.length()-1; i++) {
			if(S.charAt(i) == 'C'){
				C++;
			}
		}
		if(C!=1){
			System.out.println("WA");
			return;
		}
		if (ans.equals("wa")) {
			return;
		}
		String s = S.substring(1,S.length()).replace('C', 'c');
		if(!s.equals(s.toLowerCase())){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	} main {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String S = sc.next();
		String ans = "";
		if (!S.substring(0,1).equals("A")) {
			System.out.println("WA");
			return;
		}
		int C = 0;
		for (int i = 2; i < S.length()-1; i++) {
			if(S.charAt(i) == 'C'){
				C++;
			}
		}
		if(C!=1){
			System.out.println("WA");
			return;
		}
		if (ans.equals("wa")) {
			return;
		}
		String s = S.substring(1,S.length()).replace('C', 'c');
		if(!s.equals(s.toLowerCase())){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String ans = ""; ans "" if (!S.substring(0,1).equals("A")) {
			System.out.println("WA");
			return;
		} !S.substring(0,1).equals("A") S.substring(0,1).equals("A") S.substring(0,1).equals S.substring(0,1) S.substring S 0 1 "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 < S.length()-1; i++) {
			if(S.charAt(i) == 'C'){
				C++;
			}
		} int i = 2; int i = 2; i 2 i < S.length()-1 i S.length()-1 S.length() S.length S 1 i++ i++ i {
			if(S.charAt(i) == 'C'){
				C++;
			}
		} {
			if(S.charAt(i) == 'C'){
				C++;
			}
		} if(S.charAt(i) == 'C'){
				C++;
			} S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
				C++;
			} C++ C 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 (ans.equals("wa")) {
			return;
		} ans.equals("wa") ans.equals ans "wa" {
			return;
		} return; String s = S.substring(1,S.length()).replace('C', 'c'); s S.substring(1,S.length()).replace('C', 'c') S.substring(1,S.length()).replace S.substring(1,S.length()) S.substring S 1 S.length() S.length S 'C' 'c' if(!s.equals(s.toLowerCase())){
			System.out.println("WA");
			return;
		} !s.equals(s.toLowerCase()) s.equals(s.toLowerCase()) s.equals s s.toLowerCase() s.toLowerCase s {
			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 public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String S = sc.next();
		String ans = "";
		if (!S.substring(0,1).equals("A")) {
			System.out.println("WA");
			return;
		}
		int C = 0;
		for (int i = 2; i < S.length()-1; i++) {
			if(S.charAt(i) == 'C'){
				C++;
			}
		}
		if(C!=1){
			System.out.println("WA");
			return;
		}
		if (ans.equals("wa")) {
			return;
		}
		String s = S.substring(1,S.length()).replace('C', 'c');
		if(!s.equals(s.toLowerCase())){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}	
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String S = sc.next();
		String ans = "";
		if (!S.substring(0,1).equals("A")) {
			System.out.println("WA");
			return;
		}
		int C = 0;
		for (int i = 2; i < S.length()-1; i++) {
			if(S.charAt(i) == 'C'){
				C++;
			}
		}
		if(C!=1){
			System.out.println("WA");
			return;
		}
		if (ans.equals("wa")) {
			return;
		}
		String s = S.substring(1,S.length()).replace('C', 'c');
		if(!s.equals(s.toLowerCase())){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}	
} Main
import java.lang.reflect.Array;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String S = sc.next();
		String ans = "";
		if (!S.substring(0,1).equals("A")) {
			System.out.println("WA");
			return;
		}
		int C = 0;
		for (int i = 2; i < S.length()-1; i++) {
			if(S.charAt(i) == 'C'){
				C++;
			}
		}
		if(C!=1){
			System.out.println("WA");
			return;
		}
		if (ans.equals("wa")) {
			return;
		}
		String s = S.substring(1,S.length()).replace('C', 'c');
		if(!s.equals(s.toLowerCase())){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}	
}
