import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String a = sc.next();
        String s[] = a.split("");
        char[] c = a.toCharArray();
        int i;
        int count = 0;
        int check = 0;
        if(!s[0].equals("A")){
          System.out.println("WA");
          System.exit(0);
        }
        for(i = 1;i < a.length(); i++){
          if(Character.isUpperCase(c[i])) {
   			 count += 1;
		  }
          if(s[i].equals("C") && i > 1 && i < a.length() - 1){
             check += 1;
          }
        }
        if(count == 1 && check == 1){
          System.out.println("AC");
          System.exit(0);
        }
		
 		System.out.println("WA");
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String a = sc.next();
        String s[] = a.split("");
        char[] c = a.toCharArray();
        int i;
        int count = 0;
        int check = 0;
        if(!s[0].equals("A")){
          System.out.println("WA");
          System.exit(0);
        }
        for(i = 1;i < a.length(); i++){
          if(Character.isUpperCase(c[i])) {
   			 count += 1;
		  }
          if(s[i].equals("C") && i > 1 && i < a.length() - 1){
             check += 1;
          }
        }
        if(count == 1 && check == 1){
          System.out.println("AC");
          System.exit(0);
        }
		
 		System.out.println("WA");
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String a = sc.next();
        String s[] = a.split("");
        char[] c = a.toCharArray();
        int i;
        int count = 0;
        int check = 0;
        if(!s[0].equals("A")){
          System.out.println("WA");
          System.exit(0);
        }
        for(i = 1;i < a.length(); i++){
          if(Character.isUpperCase(c[i])) {
   			 count += 1;
		  }
          if(s[i].equals("C") && i > 1 && i < a.length() - 1){
             check += 1;
          }
        }
        if(count == 1 && check == 1){
          System.out.println("AC");
          System.exit(0);
        }
		
 		System.out.println("WA");
    } main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String a = sc.next();
        String s[] = a.split("");
        char[] c = a.toCharArray();
        int i;
        int count = 0;
        int check = 0;
        if(!s[0].equals("A")){
          System.out.println("WA");
          System.exit(0);
        }
        for(i = 1;i < a.length(); i++){
          if(Character.isUpperCase(c[i])) {
   			 count += 1;
		  }
          if(s[i].equals("C") && i > 1 && i < a.length() - 1){
             check += 1;
          }
        }
        if(count == 1 && check == 1){
          System.out.println("AC");
          System.exit(0);
        }
		
 		System.out.println("WA");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String s[] = a.split(""); s a.split("") a.split a "" char[] c = a.toCharArray(); c a.toCharArray() a.toCharArray a int i; i int count = 0; count 0 int check = 0; check 0 if(!s[0].equals("A")){
          System.out.println("WA");
          System.exit(0);
        } !s[0].equals("A") s[0].equals("A") s[0].equals 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 for(i = 1;i < a.length(); i++){
          if(Character.isUpperCase(c[i])) {
   			 count += 1;
		  }
          if(s[i].equals("C") && i > 1 && i < a.length() - 1){
             check += 1;
          }
        } i = 1; i = 1 i 1 i < a.length() i a.length() a.length a i++ i++ i {
          if(Character.isUpperCase(c[i])) {
   			 count += 1;
		  }
          if(s[i].equals("C") && i > 1 && i < a.length() - 1){
             check += 1;
          }
        } {
          if(Character.isUpperCase(c[i])) {
   			 count += 1;
		  }
          if(s[i].equals("C") && i > 1 && i < a.length() - 1){
             check += 1;
          }
        } if(Character.isUpperCase(c[i])) {
   			 count += 1;
		  } Character.isUpperCase(c[i]) Character.isUpperCase Character c[i] c i {
   			 count += 1;
		  } count += 1 count 1 if(s[i].equals("C") && i > 1 && i < a.length() - 1){
             check += 1;
          } s[i].equals("C") && i > 1 && i < a.length() - 1 s[i].equals("C") && i > 1 && i < a.length() - 1 s[i].equals("C") s[i].equals s[i] s i "C" i > 1 i 1 i < a.length() - 1 i a.length() - 1 a.length() a.length a 1 {
             check += 1;
          } check += 1 check 1 if(count == 1 && check == 1){
          System.out.println("AC");
          System.exit(0);
        } count == 1 && check == 1 count == 1 count 1 check == 1 check 1 {
          System.out.println("AC");
          System.exit(0);
        } System.out.println("AC") System.out.println System.out System System.out "AC" System.exit(0) System.exit System 0 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){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String a = sc.next();
        String s[] = a.split("");
        char[] c = a.toCharArray();
        int i;
        int count = 0;
        int check = 0;
        if(!s[0].equals("A")){
          System.out.println("WA");
          System.exit(0);
        }
        for(i = 1;i < a.length(); i++){
          if(Character.isUpperCase(c[i])) {
   			 count += 1;
		  }
          if(s[i].equals("C") && i > 1 && i < a.length() - 1){
             check += 1;
          }
        }
        if(count == 1 && check == 1){
          System.out.println("AC");
          System.exit(0);
        }
		
 		System.out.println("WA");
    }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String a = sc.next();
        String s[] = a.split("");
        char[] c = a.toCharArray();
        int i;
        int count = 0;
        int check = 0;
        if(!s[0].equals("A")){
          System.out.println("WA");
          System.exit(0);
        }
        for(i = 1;i < a.length(); i++){
          if(Character.isUpperCase(c[i])) {
   			 count += 1;
		  }
          if(s[i].equals("C") && i > 1 && i < a.length() - 1){
             check += 1;
          }
        }
        if(count == 1 && check == 1){
          System.out.println("AC");
          System.exit(0);
        }
		
 		System.out.println("WA");
    }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String a = sc.next();
        String s[] = a.split("");
        char[] c = a.toCharArray();
        int i;
        int count = 0;
        int check = 0;
        if(!s[0].equals("A")){
          System.out.println("WA");
          System.exit(0);
        }
        for(i = 1;i < a.length(); i++){
          if(Character.isUpperCase(c[i])) {
   			 count += 1;
		  }
          if(s[i].equals("C") && i > 1 && i < a.length() - 1){
             check += 1;
          }
        }
        if(count == 1 && check == 1){
          System.out.println("AC");
          System.exit(0);
        }
		
 		System.out.println("WA");
    }
}