import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    boolean isC = false;
    if(!S.substring(0,1).equals("A")){
      System.out.println("WA");
      return;
    }
      char d = S.charAt(1);
    if(Character.isUpperCase(d)){
          System.out.println("WA");
          return;
    }
    for(int i=2;i<S.length()-1;i++){
      char c = S.charAt(i);
      if(Character.isUpperCase(c)){
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      }
    }
    if(!isC){
      System.out.println("WA");
      return;
    }
    char last = S.charAt(S.length()-1);
    if(Character.isUpperCase(last)){
      System.out.println("WA");
      return;
    }
    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.next();
    boolean isC = false;
    if(!S.substring(0,1).equals("A")){
      System.out.println("WA");
      return;
    }
      char d = S.charAt(1);
    if(Character.isUpperCase(d)){
          System.out.println("WA");
          return;
    }
    for(int i=2;i<S.length()-1;i++){
      char c = S.charAt(i);
      if(Character.isUpperCase(c)){
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      }
    }
    if(!isC){
      System.out.println("WA");
      return;
    }
    char last = S.charAt(S.length()-1);
    if(Character.isUpperCase(last)){
      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();
    boolean isC = false;
    if(!S.substring(0,1).equals("A")){
      System.out.println("WA");
      return;
    }
      char d = S.charAt(1);
    if(Character.isUpperCase(d)){
          System.out.println("WA");
          return;
    }
    for(int i=2;i<S.length()-1;i++){
      char c = S.charAt(i);
      if(Character.isUpperCase(c)){
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      }
    }
    if(!isC){
      System.out.println("WA");
      return;
    }
    char last = S.charAt(S.length()-1);
    if(Character.isUpperCase(last)){
      System.out.println("WA");
      return;
    }
    System.out.println("AC");
    
          
    
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    boolean isC = false;
    if(!S.substring(0,1).equals("A")){
      System.out.println("WA");
      return;
    }
      char d = S.charAt(1);
    if(Character.isUpperCase(d)){
          System.out.println("WA");
          return;
    }
    for(int i=2;i<S.length()-1;i++){
      char c = S.charAt(i);
      if(Character.isUpperCase(c)){
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      }
    }
    if(!isC){
      System.out.println("WA");
      return;
    }
    char last = S.charAt(S.length()-1);
    if(Character.isUpperCase(last)){
      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 boolean isC = false; isC false 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; char d = S.charAt(1); d S.charAt(1) S.charAt S 1 if(Character.isUpperCase(d)){
          System.out.println("WA");
          return;
    } Character.isUpperCase(d) Character.isUpperCase Character d {
          System.out.println("WA");
          return;
    } System.out.println("WA") System.out.println System.out System System.out "WA" return; for(int i=2;i<S.length()-1;i++){
      char c = S.charAt(i);
      if(Character.isUpperCase(c)){
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      }
    } 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 {
      char c = S.charAt(i);
      if(Character.isUpperCase(c)){
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      }
    } {
      char c = S.charAt(i);
      if(Character.isUpperCase(c)){
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      }
    } char c = S.charAt(i); c S.charAt(i) S.charAt S i if(Character.isUpperCase(c)){
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      } Character.isUpperCase(c) Character.isUpperCase Character c {
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      } if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        } S.substring(i,i+1).equals("C")&&!isC S.substring(i,i+1).equals("C") S.substring(i,i+1).equals S.substring(i,i+1) S.substring S i i+1 i 1 "C" !isC isC {
          isC=true;
        } isC=true isC true {
          System.out.println("WA");
          return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; if(!isC){
      System.out.println("WA");
      return;
    } !isC isC {
      System.out.println("WA");
      return;
    } System.out.println("WA") System.out.println System.out System System.out "WA" return; char last = S.charAt(S.length()-1); last S.charAt(S.length()-1) S.charAt S S.length()-1 S.length() S.length S 1 if(Character.isUpperCase(last)){
      System.out.println("WA");
      return;
    } Character.isUpperCase(last) Character.isUpperCase Character last {
      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();
    boolean isC = false;
    if(!S.substring(0,1).equals("A")){
      System.out.println("WA");
      return;
    }
      char d = S.charAt(1);
    if(Character.isUpperCase(d)){
          System.out.println("WA");
          return;
    }
    for(int i=2;i<S.length()-1;i++){
      char c = S.charAt(i);
      if(Character.isUpperCase(c)){
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      }
    }
    if(!isC){
      System.out.println("WA");
      return;
    }
    char last = S.charAt(S.length()-1);
    if(Character.isUpperCase(last)){
      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();
    boolean isC = false;
    if(!S.substring(0,1).equals("A")){
      System.out.println("WA");
      return;
    }
      char d = S.charAt(1);
    if(Character.isUpperCase(d)){
          System.out.println("WA");
          return;
    }
    for(int i=2;i<S.length()-1;i++){
      char c = S.charAt(i);
      if(Character.isUpperCase(c)){
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      }
    }
    if(!isC){
      System.out.println("WA");
      return;
    }
    char last = S.charAt(S.length()-1);
    if(Character.isUpperCase(last)){
      System.out.println("WA");
      return;
    }
    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.next();
    boolean isC = false;
    if(!S.substring(0,1).equals("A")){
      System.out.println("WA");
      return;
    }
      char d = S.charAt(1);
    if(Character.isUpperCase(d)){
          System.out.println("WA");
          return;
    }
    for(int i=2;i<S.length()-1;i++){
      char c = S.charAt(i);
      if(Character.isUpperCase(c)){
        if(S.substring(i,i+1).equals("C")&&!isC){
          isC=true;
        }else{
          System.out.println("WA");
          return;
        }
      }
    }
    if(!isC){
      System.out.println("WA");
      return;
    }
    char last = S.charAt(S.length()-1);
    if(Character.isUpperCase(last)){
      System.out.println("WA");
      return;
    }
    System.out.println("AC");
    
          
    
  }
  

  
}