import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
	String S = sc.next();
    if (head(S) && containC(S) && lowerCase(S)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
  public static boolean head(String S) {
    if (S.charAt(0) == 'A') {
      return true;
    } else {
      return false;
    }
  }
  public static boolean containC(String S) {
    int length = S.length();
    String substringS = S.substring(2, length - 1);
    substringS = substringS.replace("C", "");
    if (length - 3 == substringS.length() + 1) {
      return true;
    } else {
      return false;
    }
  }
  public static boolean lowerCase(String S) {
    String substringFirst = S.substring(1, 2);
    String substringSecond = S.substring(2, S.length() - 1).replace("C", "");
    String substringThird = S.substring(S.length() - 1);
    if (substringFirst.equals(substringFirst.toLowerCase()) && 
        substringSecond.equals(substringSecond.toLowerCase()) &&
        substringThird.equals(substringThird.toLowerCase())) {
          return true;
    } else {
          return false;
    }
    
  }
} 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 (head(S) && containC(S) && lowerCase(S)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
  public static boolean head(String S) {
    if (S.charAt(0) == 'A') {
      return true;
    } else {
      return false;
    }
  }
  public static boolean containC(String S) {
    int length = S.length();
    String substringS = S.substring(2, length - 1);
    substringS = substringS.replace("C", "");
    if (length - 3 == substringS.length() + 1) {
      return true;
    } else {
      return false;
    }
  }
  public static boolean lowerCase(String S) {
    String substringFirst = S.substring(1, 2);
    String substringSecond = S.substring(2, S.length() - 1).replace("C", "");
    String substringThird = S.substring(S.length() - 1);
    if (substringFirst.equals(substringFirst.toLowerCase()) && 
        substringSecond.equals(substringSecond.toLowerCase()) &&
        substringThird.equals(substringThird.toLowerCase())) {
          return true;
    } else {
          return false;
    }
    
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
	String S = sc.next();
    if (head(S) && containC(S) && lowerCase(S)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  } main {
    Scanner sc = new Scanner(System.in);
	String S = sc.next();
    if (head(S) && containC(S) && lowerCase(S)) {
      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 if (head(S) && containC(S) && lowerCase(S)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    } head(S) && containC(S) && lowerCase(S) head(S) && containC(S) && lowerCase(S) head(S) head S containC(S) containC S lowerCase(S) lowerCase S {
      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 static boolean head(String S) {
    if (S.charAt(0) == 'A') {
      return true;
    } else {
      return false;
    }
  } head {
    if (S.charAt(0) == 'A') {
      return true;
    } else {
      return false;
    }
  } if (S.charAt(0) == 'A') {
      return true;
    } else {
      return false;
    } S.charAt(0) == 'A' S.charAt(0) S.charAt S 0 'A' {
      return true;
    } return true; true {
      return false;
    } return false; false String S S public static boolean containC(String S) {
    int length = S.length();
    String substringS = S.substring(2, length - 1);
    substringS = substringS.replace("C", "");
    if (length - 3 == substringS.length() + 1) {
      return true;
    } else {
      return false;
    }
  } containC {
    int length = S.length();
    String substringS = S.substring(2, length - 1);
    substringS = substringS.replace("C", "");
    if (length - 3 == substringS.length() + 1) {
      return true;
    } else {
      return false;
    }
  } int length = S.length(); length S.length() S.length S String substringS = S.substring(2, length - 1); substringS S.substring(2, length - 1) S.substring S 2 length - 1 length 1 substringS = substringS.replace("C", "") substringS substringS.replace("C", "") substringS.replace substringS "C" "" if (length - 3 == substringS.length() + 1) {
      return true;
    } else {
      return false;
    } length - 3 == substringS.length() + 1 length - 3 length 3 substringS.length() + 1 substringS.length() substringS.length substringS 1 {
      return true;
    } return true; true {
      return false;
    } return false; false String S S public static boolean lowerCase(String S) {
    String substringFirst = S.substring(1, 2);
    String substringSecond = S.substring(2, S.length() - 1).replace("C", "");
    String substringThird = S.substring(S.length() - 1);
    if (substringFirst.equals(substringFirst.toLowerCase()) && 
        substringSecond.equals(substringSecond.toLowerCase()) &&
        substringThird.equals(substringThird.toLowerCase())) {
          return true;
    } else {
          return false;
    }
    
  } lowerCase {
    String substringFirst = S.substring(1, 2);
    String substringSecond = S.substring(2, S.length() - 1).replace("C", "");
    String substringThird = S.substring(S.length() - 1);
    if (substringFirst.equals(substringFirst.toLowerCase()) && 
        substringSecond.equals(substringSecond.toLowerCase()) &&
        substringThird.equals(substringThird.toLowerCase())) {
          return true;
    } else {
          return false;
    }
    
  } String substringFirst = S.substring(1, 2); substringFirst S.substring(1, 2) S.substring S 1 2 String substringSecond = S.substring(2, S.length() - 1).replace("C", ""); substringSecond S.substring(2, S.length() - 1).replace("C", "") S.substring(2, S.length() - 1).replace S.substring(2, S.length() - 1) S.substring S 2 S.length() - 1 S.length() S.length S 1 "C" "" String substringThird = S.substring(S.length() - 1); substringThird S.substring(S.length() - 1) S.substring S S.length() - 1 S.length() S.length S 1 if (substringFirst.equals(substringFirst.toLowerCase()) && 
        substringSecond.equals(substringSecond.toLowerCase()) &&
        substringThird.equals(substringThird.toLowerCase())) {
          return true;
    } else {
          return false;
    } substringFirst.equals(substringFirst.toLowerCase()) && 
        substringSecond.equals(substringSecond.toLowerCase()) &&
        substringThird.equals(substringThird.toLowerCase()) substringFirst.equals(substringFirst.toLowerCase()) && 
        substringSecond.equals(substringSecond.toLowerCase()) &&
        substringThird.equals(substringThird.toLowerCase()) substringFirst.equals(substringFirst.toLowerCase()) substringFirst.equals substringFirst substringFirst.toLowerCase() substringFirst.toLowerCase substringFirst substringSecond.equals(substringSecond.toLowerCase()) substringSecond.equals substringSecond substringSecond.toLowerCase() substringSecond.toLowerCase substringSecond substringThird.equals(substringThird.toLowerCase()) substringThird.equals substringThird substringThird.toLowerCase() substringThird.toLowerCase substringThird {
          return true;
    } return true; true {
          return false;
    } return false; false String S S public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
	String S = sc.next();
    if (head(S) && containC(S) && lowerCase(S)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
  public static boolean head(String S) {
    if (S.charAt(0) == 'A') {
      return true;
    } else {
      return false;
    }
  }
  public static boolean containC(String S) {
    int length = S.length();
    String substringS = S.substring(2, length - 1);
    substringS = substringS.replace("C", "");
    if (length - 3 == substringS.length() + 1) {
      return true;
    } else {
      return false;
    }
  }
  public static boolean lowerCase(String S) {
    String substringFirst = S.substring(1, 2);
    String substringSecond = S.substring(2, S.length() - 1).replace("C", "");
    String substringThird = S.substring(S.length() - 1);
    if (substringFirst.equals(substringFirst.toLowerCase()) && 
        substringSecond.equals(substringSecond.toLowerCase()) &&
        substringThird.equals(substringThird.toLowerCase())) {
          return true;
    } else {
          return false;
    }
    
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
	String S = sc.next();
    if (head(S) && containC(S) && lowerCase(S)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
  public static boolean head(String S) {
    if (S.charAt(0) == 'A') {
      return true;
    } else {
      return false;
    }
  }
  public static boolean containC(String S) {
    int length = S.length();
    String substringS = S.substring(2, length - 1);
    substringS = substringS.replace("C", "");
    if (length - 3 == substringS.length() + 1) {
      return true;
    } else {
      return false;
    }
  }
  public static boolean lowerCase(String S) {
    String substringFirst = S.substring(1, 2);
    String substringSecond = S.substring(2, S.length() - 1).replace("C", "");
    String substringThird = S.substring(S.length() - 1);
    if (substringFirst.equals(substringFirst.toLowerCase()) && 
        substringSecond.equals(substringSecond.toLowerCase()) &&
        substringThird.equals(substringThird.toLowerCase())) {
          return true;
    } else {
          return false;
    }
    
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
	String S = sc.next();
    if (head(S) && containC(S) && lowerCase(S)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
  public static boolean head(String S) {
    if (S.charAt(0) == 'A') {
      return true;
    } else {
      return false;
    }
  }
  public static boolean containC(String S) {
    int length = S.length();
    String substringS = S.substring(2, length - 1);
    substringS = substringS.replace("C", "");
    if (length - 3 == substringS.length() + 1) {
      return true;
    } else {
      return false;
    }
  }
  public static boolean lowerCase(String S) {
    String substringFirst = S.substring(1, 2);
    String substringSecond = S.substring(2, S.length() - 1).replace("C", "");
    String substringThird = S.substring(S.length() - 1);
    if (substringFirst.equals(substringFirst.toLowerCase()) && 
        substringSecond.equals(substringSecond.toLowerCase()) &&
        substringThird.equals(substringThird.toLowerCase())) {
          return true;
    } else {
          return false;
    }
    
  }
}