import java.util.*;
public class Main {
   public static void main(String[] args) {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      
      if(s.charAt(0) != 'A')
         System.out.println("WA");
      else if(Character.isUpperCase(s.charAt(1)) || Character.isUpperCase(s.charAt(s.length()-1)))
         System.out.println("WA");
      else {
         int count = 0;
         for(int i = 2; i < s.length(); i++) {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         }
         if(count != 1)  
            System.out.println("WA");
         else 
            System.out.println("AC");
      }
   }
} import java.util.*; util.* java public class Main {
   public static void main(String[] args) {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      
      if(s.charAt(0) != 'A')
         System.out.println("WA");
      else if(Character.isUpperCase(s.charAt(1)) || Character.isUpperCase(s.charAt(s.length()-1)))
         System.out.println("WA");
      else {
         int count = 0;
         for(int i = 2; i < s.length(); i++) {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         }
         if(count != 1)  
            System.out.println("WA");
         else 
            System.out.println("AC");
      }
   }
} Main public static void main(String[] args) {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      
      if(s.charAt(0) != 'A')
         System.out.println("WA");
      else if(Character.isUpperCase(s.charAt(1)) || Character.isUpperCase(s.charAt(s.length()-1)))
         System.out.println("WA");
      else {
         int count = 0;
         for(int i = 2; i < s.length(); i++) {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         }
         if(count != 1)  
            System.out.println("WA");
         else 
            System.out.println("AC");
      }
   } main {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      
      if(s.charAt(0) != 'A')
         System.out.println("WA");
      else if(Character.isUpperCase(s.charAt(1)) || Character.isUpperCase(s.charAt(s.length()-1)))
         System.out.println("WA");
      else {
         int count = 0;
         for(int i = 2; i < s.length(); i++) {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         }
         if(count != 1)  
            System.out.println("WA");
         else 
            System.out.println("AC");
      }
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc if(s.charAt(0) != 'A')
         System.out.println("WA");
      else if(Character.isUpperCase(s.charAt(1)) || Character.isUpperCase(s.charAt(s.length()-1)))
         System.out.println("WA");
      else {
         int count = 0;
         for(int i = 2; i < s.length(); i++) {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         }
         if(count != 1)  
            System.out.println("WA");
         else 
            System.out.println("AC");
      } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' System.out.println("WA") System.out.println System.out System System.out "WA" if(Character.isUpperCase(s.charAt(1)) || Character.isUpperCase(s.charAt(s.length()-1)))
         System.out.println("WA");
      else {
         int count = 0;
         for(int i = 2; i < s.length(); i++) {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         }
         if(count != 1)  
            System.out.println("WA");
         else 
            System.out.println("AC");
      } Character.isUpperCase(s.charAt(1)) || Character.isUpperCase(s.charAt(s.length()-1)) Character.isUpperCase(s.charAt(1)) Character.isUpperCase Character s.charAt(1) s.charAt s 1 Character.isUpperCase(s.charAt(s.length()-1)) Character.isUpperCase Character s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 System.out.println("WA") System.out.println System.out System System.out "WA" {
         int count = 0;
         for(int i = 2; i < s.length(); i++) {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         }
         if(count != 1)  
            System.out.println("WA");
         else 
            System.out.println("AC");
      } int count = 0; count 0 for(int i = 2; i < s.length(); i++) {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         } int i = 2; int i = 2; i 2 i < s.length() i s.length() s.length s i++ i++ i {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         } {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         } if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            } Character.isUpperCase(s.charAt(i)) && count == 1 Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i count == 1 count 1 {
               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.charAt(i) == 'C')
               count++; s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' count++ count if(count != 1)  
            System.out.println("WA");
         else 
            System.out.println("AC"); count != 1 count 1 System.out.println("WA") System.out.println System.out System System.out "WA" 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.nextLine();
      
      if(s.charAt(0) != 'A')
         System.out.println("WA");
      else if(Character.isUpperCase(s.charAt(1)) || Character.isUpperCase(s.charAt(s.length()-1)))
         System.out.println("WA");
      else {
         int count = 0;
         for(int i = 2; i < s.length(); i++) {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         }
         if(count != 1)  
            System.out.println("WA");
         else 
            System.out.println("AC");
      }
   }
} public class Main {
   public static void main(String[] args) {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      
      if(s.charAt(0) != 'A')
         System.out.println("WA");
      else if(Character.isUpperCase(s.charAt(1)) || Character.isUpperCase(s.charAt(s.length()-1)))
         System.out.println("WA");
      else {
         int count = 0;
         for(int i = 2; i < s.length(); i++) {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         }
         if(count != 1)  
            System.out.println("WA");
         else 
            System.out.println("AC");
      }
   }
} Main
import java.util.*;
public class Main {
   public static void main(String[] args) {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      
      if(s.charAt(0) != 'A')
         System.out.println("WA");
      else if(Character.isUpperCase(s.charAt(1)) || Character.isUpperCase(s.charAt(s.length()-1)))
         System.out.println("WA");
      else {
         int count = 0;
         for(int i = 2; i < s.length(); i++) {
            if(Character.isUpperCase(s.charAt(i)) && count == 1) {
               System.out.println("WA");
               System.exit(0);
            }
            if(s.charAt(i) == 'C')
               count++;  
         }
         if(count != 1)  
            System.out.println("WA");
         else 
            System.out.println("AC");
      }
   }
}