import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    int countC = 0;
    for (int i = 0; i < S.length(); i++) {
      char c = S.charAt(i);
      if (i == 0) {
        if (c != 'A') {
          System.out.println("WA");
          return;
        }
      } else if (2 <= i && i <= S.length() - 2 && c == 'C') {
        countC++;
      } else {
        if (!('a' <= c && c <= 'z')) {
          System.out.println("WA");
          return;
        }
      }
    }
    if (countC != 1) {
      System.out.println("WA");
      return;
    }

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

    System.out.println("AC");
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    int countC = 0;
    for (int i = 0; i < S.length(); i++) {
      char c = S.charAt(i);
      if (i == 0) {
        if (c != 'A') {
          System.out.println("WA");
          return;
        }
      } else if (2 <= i && i <= S.length() - 2 && c == 'C') {
        countC++;
      } else {
        if (!('a' <= c && c <= 'z')) {
          System.out.println("WA");
          return;
        }
      }
    }
    if (countC != 1) {
      System.out.println("WA");
      return;
    }

    System.out.println("AC");
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    int countC = 0;
    for (int i = 0; i < S.length(); i++) {
      char c = S.charAt(i);
      if (i == 0) {
        if (c != 'A') {
          System.out.println("WA");
          return;
        }
      } else if (2 <= i && i <= S.length() - 2 && c == 'C') {
        countC++;
      } else {
        if (!('a' <= c && c <= 'z')) {
          System.out.println("WA");
          return;
        }
      }
    }
    if (countC != 1) {
      System.out.println("WA");
      return;
    }

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

    System.out.println("AC");
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    int countC = 0;
    for (int i = 0; i < S.length(); i++) {
      char c = S.charAt(i);
      if (i == 0) {
        if (c != 'A') {
          System.out.println("WA");
          return;
        }
      } else if (2 <= i && i <= S.length() - 2 && c == 'C') {
        countC++;
      } else {
        if (!('a' <= c && c <= 'z')) {
          System.out.println("WA");
          return;
        }
      }
    }
    if (countC != 1) {
      System.out.println("WA");
      return;
    }

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

    System.out.println("AC");
  }
}