import java.util.*;

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

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    boolean A = false;
    boolean B = true;
    int C = 0;
    for(int i = 0; i < S.length(); i++){
      if(i == 0){
        if(S.charAt(i) == 'A'){
          A = true;
        }
      }else if(i == 1 || i == S.length()-1){
        if(S.charAt(i) >= 'A' && S.charAt(i) <= 'Z'){
          B = false;
        }
      }else{
        if(S.charAt(i) == 'C'){
          C++;
        }else{
          if(S.charAt(i) >= 'A' && S.charAt(i) <= 'Z'){
            B = false;
          }
        }
      }
    }
    System.out.println((A && B && C==1) ? "AC" : "WA");
  }
}