import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String head = s.substring(0,1);
    String last = s.substring(2,s.length()-1);
    int ch = 0;
    if(head.equals("A"))ch++;
    if(last.length() - last.replace("C","").length() == 1)ch++;
    if(ch != 2){
      System.out.println("WA");
      return;
    }
    last = s.substring(2,s.length());
    last = last.replace("C","");
    String ALP[] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
    for(String al:ALP){
      if(last.contains(al) || s.substring(1,2).equals(al)){
        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();
    String head = s.substring(0,1);
    String last = s.substring(2,s.length()-1);
    int ch = 0;
    if(head.equals("A"))ch++;
    if(last.length() - last.replace("C","").length() == 1)ch++;
    if(ch != 2){
      System.out.println("WA");
      return;
    }
    last = s.substring(2,s.length());
    last = last.replace("C","");
    String ALP[] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
    for(String al:ALP){
      if(last.contains(al) || s.substring(1,2).equals(al)){
        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 head = s.substring(0,1);
    String last = s.substring(2,s.length()-1);
    int ch = 0;
    if(head.equals("A"))ch++;
    if(last.length() - last.replace("C","").length() == 1)ch++;
    if(ch != 2){
      System.out.println("WA");
      return;
    }
    last = s.substring(2,s.length());
    last = last.replace("C","");
    String ALP[] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
    for(String al:ALP){
      if(last.contains(al) || s.substring(1,2).equals(al)){
        System.out.println("WA");
        return;
      }
    }
    System.out.println("AC");
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String head = s.substring(0,1);
    String last = s.substring(2,s.length()-1);
    int ch = 0;
    if(head.equals("A"))ch++;
    if(last.length() - last.replace("C","").length() == 1)ch++;
    if(ch != 2){
      System.out.println("WA");
      return;
    }
    last = s.substring(2,s.length());
    last = last.replace("C","");
    String ALP[] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
    for(String al:ALP){
      if(last.contains(al) || s.substring(1,2).equals(al)){
        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 head = s.substring(0,1); head s.substring(0,1) s.substring s 0 1 String last = s.substring(2,s.length()-1); last s.substring(2,s.length()-1) s.substring s 2 s.length()-1 s.length() s.length s 1 int ch = 0; ch 0 if(head.equals("A"))ch++; head.equals("A") head.equals head "A" ch++ ch if(last.length() - last.replace("C","").length() == 1)ch++; last.length() - last.replace("C","").length() == 1 last.length() - last.replace("C","").length() last.length() last.length last last.replace("C","").length() last.replace("C","").length last.replace("C","") last.replace last "C" "" 1 ch++ ch if(ch != 2){
      System.out.println("WA");
      return;
    } ch != 2 ch 2 {
      System.out.println("WA");
      return;
    } System.out.println("WA") System.out.println System.out System System.out "WA" return; last = s.substring(2,s.length()) last s.substring(2,s.length()) s.substring s 2 s.length() s.length s last = last.replace("C","") last last.replace("C","") last.replace last "C" "" String ALP[] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}; ALP {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"} "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z" for(String al:ALP){
      if(last.contains(al) || s.substring(1,2).equals(al)){
        System.out.println("WA");
        return;
      }
    } String al ALP {
      if(last.contains(al) || s.substring(1,2).equals(al)){
        System.out.println("WA");
        return;
      }
    } {
      if(last.contains(al) || s.substring(1,2).equals(al)){
        System.out.println("WA");
        return;
      }
    } if(last.contains(al) || s.substring(1,2).equals(al)){
        System.out.println("WA");
        return;
      } last.contains(al) || s.substring(1,2).equals(al) last.contains(al) last.contains last al s.substring(1,2).equals(al) s.substring(1,2).equals s.substring(1,2) s.substring s 1 2 al {
        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 head = s.substring(0,1);
    String last = s.substring(2,s.length()-1);
    int ch = 0;
    if(head.equals("A"))ch++;
    if(last.length() - last.replace("C","").length() == 1)ch++;
    if(ch != 2){
      System.out.println("WA");
      return;
    }
    last = s.substring(2,s.length());
    last = last.replace("C","");
    String ALP[] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
    for(String al:ALP){
      if(last.contains(al) || s.substring(1,2).equals(al)){
        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 head = s.substring(0,1);
    String last = s.substring(2,s.length()-1);
    int ch = 0;
    if(head.equals("A"))ch++;
    if(last.length() - last.replace("C","").length() == 1)ch++;
    if(ch != 2){
      System.out.println("WA");
      return;
    }
    last = s.substring(2,s.length());
    last = last.replace("C","");
    String ALP[] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
    for(String al:ALP){
      if(last.contains(al) || s.substring(1,2).equals(al)){
        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();
    String head = s.substring(0,1);
    String last = s.substring(2,s.length()-1);
    int ch = 0;
    if(head.equals("A"))ch++;
    if(last.length() - last.replace("C","").length() == 1)ch++;
    if(ch != 2){
      System.out.println("WA");
      return;
    }
    last = s.substring(2,s.length());
    last = last.replace("C","");
    String ALP[] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
    for(String al:ALP){
      if(last.contains(al) || s.substring(1,2).equals(al)){
        System.out.println("WA");
        return;
      }
    }
    System.out.println("AC");
  }
}
