import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    boolean ok = true;

    if (s.charAt(0) != 'A') {
      ok = false;
    }

    boolean cok = true;
    for (int i = 2; i < (s.length() - 1); i++) {
      if (s.charAt(i) == 'C') {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      }
    }

    if (cok) {
      ok = false;
    }

    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if ((c != 'A') && (c != 'C')) {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      }
    }

    if (ok) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }

  }
} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    boolean ok = true;

    if (s.charAt(0) != 'A') {
      ok = false;
    }

    boolean cok = true;
    for (int i = 2; i < (s.length() - 1); i++) {
      if (s.charAt(i) == 'C') {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      }
    }

    if (cok) {
      ok = false;
    }

    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if ((c != 'A') && (c != 'C')) {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      }
    }

    if (ok) {
      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();
    boolean ok = true;

    if (s.charAt(0) != 'A') {
      ok = false;
    }

    boolean cok = true;
    for (int i = 2; i < (s.length() - 1); i++) {
      if (s.charAt(i) == 'C') {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      }
    }

    if (cok) {
      ok = false;
    }

    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if ((c != 'A') && (c != 'C')) {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      }
    }

    if (ok) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }

  } main {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    boolean ok = true;

    if (s.charAt(0) != 'A') {
      ok = false;
    }

    boolean cok = true;
    for (int i = 2; i < (s.length() - 1); i++) {
      if (s.charAt(i) == 'C') {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      }
    }

    if (cok) {
      ok = false;
    }

    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if ((c != 'A') && (c != 'C')) {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      }
    }

    if (ok) {
      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 boolean ok = true; ok true if (s.charAt(0) != 'A') {
      ok = false;
    } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
      ok = false;
    } ok = false ok false boolean cok = true; cok true for (int i = 2; i < (s.length() - 1); i++) {
      if (s.charAt(i) == 'C') {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      }
    } 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') {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      }
    } {
      if (s.charAt(i) == 'C') {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      }
    } if (s.charAt(i) == 'C') {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      } if (!cok) {
          ok = false;
        } else {
          cok = false;
        } !cok cok {
          ok = false;
        } ok = false ok false {
          cok = false;
        } cok = false cok false if (cok) {
      ok = false;
    } cok {
      ok = false;
    } ok = false ok false for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if ((c != 'A') && (c != 'C')) {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      }
    } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
      char c = s.charAt(i);
      if ((c != 'A') && (c != 'C')) {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      }
    } {
      char c = s.charAt(i);
      if ((c != 'A') && (c != 'C')) {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      }
    } char c = s.charAt(i); c s.charAt(i) s.charAt s i if ((c != 'A') && (c != 'C')) {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      } (c != 'A') && (c != 'C') (c != 'A') c 'A' (c != 'C') c 'C' {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      } if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        } !(('a' <= c) && (c <= 'z')) (('a' <= c) && (c <= 'z')) ('a' <= c) 'a' c (c <= 'z') c 'z' {
          ok = false;
        } ok = false ok false if (ok) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    } ok {
      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();
    boolean ok = true;

    if (s.charAt(0) != 'A') {
      ok = false;
    }

    boolean cok = true;
    for (int i = 2; i < (s.length() - 1); i++) {
      if (s.charAt(i) == 'C') {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      }
    }

    if (cok) {
      ok = false;
    }

    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if ((c != 'A') && (c != 'C')) {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      }
    }

    if (ok) {
      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();
    boolean ok = true;

    if (s.charAt(0) != 'A') {
      ok = false;
    }

    boolean cok = true;
    for (int i = 2; i < (s.length() - 1); i++) {
      if (s.charAt(i) == 'C') {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      }
    }

    if (cok) {
      ok = false;
    }

    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if ((c != 'A') && (c != 'C')) {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      }
    }

    if (ok) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }

  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    boolean ok = true;

    if (s.charAt(0) != 'A') {
      ok = false;
    }

    boolean cok = true;
    for (int i = 2; i < (s.length() - 1); i++) {
      if (s.charAt(i) == 'C') {
        if (!cok) {
          ok = false;
        } else {
          cok = false;
        }
      }
    }

    if (cok) {
      ok = false;
    }

    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if ((c != 'A') && (c != 'C')) {
        if (!(('a' <= c) && (c <= 'z'))) {
          ok = false;
        }
      }
    }

    if (ok) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }

  }
}