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