import java.util.*;

public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    String str = sc.next();
    boolean flag = true;

    if (!(String.valueOf(str.charAt(0)).equals("A"))) {
      flag = false;
    } else if (Character.isUpperCase(str.charAt(1)) || Character.isUpperCase(str.charAt(str.length()-1))) {
      flag = false;
    } else {
      int count = 0;

      for (int i = 2; i < str.length()-1; i++) {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      }

      if (count != 1) {
        flag = false;
      }
    }

    if (flag == true) {
      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 str = sc.next();
    boolean flag = true;

    if (!(String.valueOf(str.charAt(0)).equals("A"))) {
      flag = false;
    } else if (Character.isUpperCase(str.charAt(1)) || Character.isUpperCase(str.charAt(str.length()-1))) {
      flag = false;
    } else {
      int count = 0;

      for (int i = 2; i < str.length()-1; i++) {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      }

      if (count != 1) {
        flag = false;
      }
    }

    if (flag == true) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
} Main public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    String str = sc.next();
    boolean flag = true;

    if (!(String.valueOf(str.charAt(0)).equals("A"))) {
      flag = false;
    } else if (Character.isUpperCase(str.charAt(1)) || Character.isUpperCase(str.charAt(str.length()-1))) {
      flag = false;
    } else {
      int count = 0;

      for (int i = 2; i < str.length()-1; i++) {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      }

      if (count != 1) {
        flag = false;
      }
    }

    if (flag == true) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  } main {
    Scanner sc = new Scanner(System.in);

    String str = sc.next();
    boolean flag = true;

    if (!(String.valueOf(str.charAt(0)).equals("A"))) {
      flag = false;
    } else if (Character.isUpperCase(str.charAt(1)) || Character.isUpperCase(str.charAt(str.length()-1))) {
      flag = false;
    } else {
      int count = 0;

      for (int i = 2; i < str.length()-1; i++) {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      }

      if (count != 1) {
        flag = false;
      }
    }

    if (flag == true) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc boolean flag = true; flag true if (!(String.valueOf(str.charAt(0)).equals("A"))) {
      flag = false;
    } else if (Character.isUpperCase(str.charAt(1)) || Character.isUpperCase(str.charAt(str.length()-1))) {
      flag = false;
    } else {
      int count = 0;

      for (int i = 2; i < str.length()-1; i++) {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      }

      if (count != 1) {
        flag = false;
      }
    } !(String.valueOf(str.charAt(0)).equals("A")) (String.valueOf(str.charAt(0)).equals("A")) String.valueOf(str.charAt(0)).equals String.valueOf(str.charAt(0)) String.valueOf String str.charAt(0) str.charAt str 0 "A" {
      flag = false;
    } flag = false flag false if (Character.isUpperCase(str.charAt(1)) || Character.isUpperCase(str.charAt(str.length()-1))) {
      flag = false;
    } else {
      int count = 0;

      for (int i = 2; i < str.length()-1; i++) {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      }

      if (count != 1) {
        flag = false;
      }
    } Character.isUpperCase(str.charAt(1)) || Character.isUpperCase(str.charAt(str.length()-1)) Character.isUpperCase(str.charAt(1)) Character.isUpperCase Character str.charAt(1) str.charAt str 1 Character.isUpperCase(str.charAt(str.length()-1)) Character.isUpperCase Character str.charAt(str.length()-1) str.charAt str str.length()-1 str.length() str.length str 1 {
      flag = false;
    } flag = false flag false {
      int count = 0;

      for (int i = 2; i < str.length()-1; i++) {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      }

      if (count != 1) {
        flag = false;
      }
    } int count = 0; count 0 for (int i = 2; i < str.length()-1; i++) {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      } int i = 2; int i = 2; i 2 i < str.length()-1 i str.length()-1 str.length() str.length str 1 i++ i++ i {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      } {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      } if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        } String.valueOf(str.charAt(i)).equals("C") String.valueOf(str.charAt(i)).equals String.valueOf(str.charAt(i)) String.valueOf String str.charAt(i) str.charAt str i "C" {
          count++;
        } count++ count if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        } Character.isUpperCase(str.charAt(i)) Character.isUpperCase Character str.charAt(i) str.charAt str i {
          flag = false;
        } flag = false flag false if (count != 1) {
        flag = false;
      } count != 1 count 1 {
        flag = false;
      } flag = false flag false if (flag == true) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    } flag == true flag true {
      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 str = sc.next();
    boolean flag = true;

    if (!(String.valueOf(str.charAt(0)).equals("A"))) {
      flag = false;
    } else if (Character.isUpperCase(str.charAt(1)) || Character.isUpperCase(str.charAt(str.length()-1))) {
      flag = false;
    } else {
      int count = 0;

      for (int i = 2; i < str.length()-1; i++) {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      }

      if (count != 1) {
        flag = false;
      }
    }

    if (flag == true) {
      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 str = sc.next();
    boolean flag = true;

    if (!(String.valueOf(str.charAt(0)).equals("A"))) {
      flag = false;
    } else if (Character.isUpperCase(str.charAt(1)) || Character.isUpperCase(str.charAt(str.length()-1))) {
      flag = false;
    } else {
      int count = 0;

      for (int i = 2; i < str.length()-1; i++) {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      }

      if (count != 1) {
        flag = false;
      }
    }

    if (flag == true) {
      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 str = sc.next();
    boolean flag = true;

    if (!(String.valueOf(str.charAt(0)).equals("A"))) {
      flag = false;
    } else if (Character.isUpperCase(str.charAt(1)) || Character.isUpperCase(str.charAt(str.length()-1))) {
      flag = false;
    } else {
      int count = 0;

      for (int i = 2; i < str.length()-1; i++) {
        if (String.valueOf(str.charAt(i)).equals("C")) {
          count++;
        } else if (Character.isUpperCase(str.charAt(i))) {
          flag = false;
        }
      }

      if (count != 1) {
        flag = false;
      }
    }

    if (flag == true) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
}
