import java.util.*;
 
public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    if(!S.substring(0, 1).equals("A")){
      System.out.println("WA");
    } else if(!S.substring(2, S.length()-1).contains("C")) {
      System.out.println("WA");
    } else  {
      String newS = S.substring(1, S.length()).replaceFirst("C", "c");
      if(!newS.equals(S.substring(1, S.length()).toLowerCase())) {
        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.next();
    
    if(!S.substring(0, 1).equals("A")){
      System.out.println("WA");
    } else if(!S.substring(2, S.length()-1).contains("C")) {
      System.out.println("WA");
    } else  {
      String newS = S.substring(1, S.length()).replaceFirst("C", "c");
      if(!newS.equals(S.substring(1, S.length()).toLowerCase())) {
        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.next();
    
    if(!S.substring(0, 1).equals("A")){
      System.out.println("WA");
    } else if(!S.substring(2, S.length()-1).contains("C")) {
      System.out.println("WA");
    } else  {
      String newS = S.substring(1, S.length()).replaceFirst("C", "c");
      if(!newS.equals(S.substring(1, S.length()).toLowerCase())) {
        System.out.println("WA");
      } else {
        System.out.println("AC");
      }
    } 
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    if(!S.substring(0, 1).equals("A")){
      System.out.println("WA");
    } else if(!S.substring(2, S.length()-1).contains("C")) {
      System.out.println("WA");
    } else  {
      String newS = S.substring(1, S.length()).replaceFirst("C", "c");
      if(!newS.equals(S.substring(1, S.length()).toLowerCase())) {
        System.out.println("WA");
      } else {
        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 if(!S.substring(0, 1).equals("A")){
      System.out.println("WA");
    } else if(!S.substring(2, S.length()-1).contains("C")) {
      System.out.println("WA");
    } else  {
      String newS = S.substring(1, S.length()).replaceFirst("C", "c");
      if(!newS.equals(S.substring(1, S.length()).toLowerCase())) {
        System.out.println("WA");
      } else {
        System.out.println("AC");
      }
    } !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");
    } System.out.println("WA") System.out.println System.out System System.out "WA" if(!S.substring(2, S.length()-1).contains("C")) {
      System.out.println("WA");
    } else  {
      String newS = S.substring(1, S.length()).replaceFirst("C", "c");
      if(!newS.equals(S.substring(1, S.length()).toLowerCase())) {
        System.out.println("WA");
      } else {
        System.out.println("AC");
      }
    } !S.substring(2, S.length()-1).contains("C") S.substring(2, S.length()-1).contains("C") S.substring(2, S.length()-1).contains S.substring(2, S.length()-1) S.substring S 2 S.length()-1 S.length() S.length S 1 "C" {
      System.out.println("WA");
    } System.out.println("WA") System.out.println System.out System System.out "WA" {
      String newS = S.substring(1, S.length()).replaceFirst("C", "c");
      if(!newS.equals(S.substring(1, S.length()).toLowerCase())) {
        System.out.println("WA");
      } else {
        System.out.println("AC");
      }
    } String newS = S.substring(1, S.length()).replaceFirst("C", "c"); newS S.substring(1, S.length()).replaceFirst("C", "c") S.substring(1, S.length()).replaceFirst S.substring(1, S.length()) S.substring S 1 S.length() S.length S "C" "c" if(!newS.equals(S.substring(1, S.length()).toLowerCase())) {
        System.out.println("WA");
      } else {
        System.out.println("AC");
      } !newS.equals(S.substring(1, S.length()).toLowerCase()) newS.equals(S.substring(1, S.length()).toLowerCase()) newS.equals newS S.substring(1, S.length()).toLowerCase() S.substring(1, S.length()).toLowerCase S.substring(1, S.length()) S.substring S 1 S.length() S.length S {
        System.out.println("WA");
      } System.out.println("WA") System.out.println System.out System System.out "WA" {
        System.out.println("AC");
      } 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();
    
    if(!S.substring(0, 1).equals("A")){
      System.out.println("WA");
    } else if(!S.substring(2, S.length()-1).contains("C")) {
      System.out.println("WA");
    } else  {
      String newS = S.substring(1, S.length()).replaceFirst("C", "c");
      if(!newS.equals(S.substring(1, S.length()).toLowerCase())) {
        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.next();
    
    if(!S.substring(0, 1).equals("A")){
      System.out.println("WA");
    } else if(!S.substring(2, S.length()-1).contains("C")) {
      System.out.println("WA");
    } else  {
      String newS = S.substring(1, S.length()).replaceFirst("C", "c");
      if(!newS.equals(S.substring(1, S.length()).toLowerCase())) {
        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.next();
    
    if(!S.substring(0, 1).equals("A")){
      System.out.println("WA");
    } else if(!S.substring(2, S.length()-1).contains("C")) {
      System.out.println("WA");
    } else  {
      String newS = S.substring(1, S.length()).replaceFirst("C", "c");
      if(!newS.equals(S.substring(1, S.length()).toLowerCase())) {
        System.out.println("WA");
      } else {
        System.out.println("AC");
      }
    } 
  }
}