import java.util.*;
import java.util.Collections;
import java.util.stream.Collectors;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String ans = "WA";
    int cnt = 0;
    int cnt2 = 0;
    if (S.charAt(0) == 'A') {
      for (int i = 2; i < S.length() - 1; i++) {
        if (S.charAt(i) == 'C') {
          cnt++;
        }
      }
      String str1 = S.replace("A", "a");
      String str2 = str1.replace("C", "c");
      if (cnt == 1) {
        for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        }
        if (cnt2 == str2.length()) {
          ans = "AC";
        }
      }
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java import java.util.Collections; Collections java.util import java.util.stream.Collectors; Collectors java.util.stream public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String ans = "WA";
    int cnt = 0;
    int cnt2 = 0;
    if (S.charAt(0) == 'A') {
      for (int i = 2; i < S.length() - 1; i++) {
        if (S.charAt(i) == 'C') {
          cnt++;
        }
      }
      String str1 = S.replace("A", "a");
      String str2 = str1.replace("C", "c");
      if (cnt == 1) {
        for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        }
        if (cnt2 == str2.length()) {
          ans = "AC";
        }
      }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String ans = "WA";
    int cnt = 0;
    int cnt2 = 0;
    if (S.charAt(0) == 'A') {
      for (int i = 2; i < S.length() - 1; i++) {
        if (S.charAt(i) == 'C') {
          cnt++;
        }
      }
      String str1 = S.replace("A", "a");
      String str2 = str1.replace("C", "c");
      if (cnt == 1) {
        for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        }
        if (cnt2 == str2.length()) {
          ans = "AC";
        }
      }
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String ans = "WA";
    int cnt = 0;
    int cnt2 = 0;
    if (S.charAt(0) == 'A') {
      for (int i = 2; i < S.length() - 1; i++) {
        if (S.charAt(i) == 'C') {
          cnt++;
        }
      }
      String str1 = S.replace("A", "a");
      String str2 = str1.replace("C", "c");
      if (cnt == 1) {
        for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        }
        if (cnt2 == str2.length()) {
          ans = "AC";
        }
      }
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String ans = "WA"; ans "WA" int cnt = 0; cnt 0 int cnt2 = 0; cnt2 0 if (S.charAt(0) == 'A') {
      for (int i = 2; i < S.length() - 1; i++) {
        if (S.charAt(i) == 'C') {
          cnt++;
        }
      }
      String str1 = S.replace("A", "a");
      String str2 = str1.replace("C", "c");
      if (cnt == 1) {
        for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        }
        if (cnt2 == str2.length()) {
          ans = "AC";
        }
      }
    } S.charAt(0) == 'A' S.charAt(0) S.charAt S 0 'A' {
      for (int i = 2; i < S.length() - 1; i++) {
        if (S.charAt(i) == 'C') {
          cnt++;
        }
      }
      String str1 = S.replace("A", "a");
      String str2 = str1.replace("C", "c");
      if (cnt == 1) {
        for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        }
        if (cnt2 == str2.length()) {
          ans = "AC";
        }
      }
    } for (int i = 2; i < S.length() - 1; i++) {
        if (S.charAt(i) == 'C') {
          cnt++;
        }
      } 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') {
          cnt++;
        }
      } {
        if (S.charAt(i) == 'C') {
          cnt++;
        }
      } if (S.charAt(i) == 'C') {
          cnt++;
        } S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
          cnt++;
        } cnt++ cnt String str1 = S.replace("A", "a"); str1 S.replace("A", "a") S.replace S "A" "a" String str2 = str1.replace("C", "c"); str2 str1.replace("C", "c") str1.replace str1 "C" "c" if (cnt == 1) {
        for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        }
        if (cnt2 == str2.length()) {
          ans = "AC";
        }
      } cnt == 1 cnt 1 {
        for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        }
        if (cnt2 == str2.length()) {
          ans = "AC";
        }
      } for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        } int i = 0; int i = 0; i 0 i < str2.length() i str2.length() str2.length str2 i++ i++ i {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        } {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        } if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          } !Character.isLowerCase(str2.charAt(i)) Character.isLowerCase(str2.charAt(i)) Character.isLowerCase Character str2.charAt(i) str2.charAt str2 i {
            break;
          } break; {
            cnt2++;
          } cnt2++ cnt2 if (cnt2 == str2.length()) {
          ans = "AC";
        } cnt2 == str2.length() cnt2 str2.length() str2.length str2 {
          ans = "AC";
        } ans = "AC" ans "AC" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String ans = "WA";
    int cnt = 0;
    int cnt2 = 0;
    if (S.charAt(0) == 'A') {
      for (int i = 2; i < S.length() - 1; i++) {
        if (S.charAt(i) == 'C') {
          cnt++;
        }
      }
      String str1 = S.replace("A", "a");
      String str2 = str1.replace("C", "c");
      if (cnt == 1) {
        for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        }
        if (cnt2 == str2.length()) {
          ans = "AC";
        }
      }
    }
    System.out.println(ans);
  }
} public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String ans = "WA";
    int cnt = 0;
    int cnt2 = 0;
    if (S.charAt(0) == 'A') {
      for (int i = 2; i < S.length() - 1; i++) {
        if (S.charAt(i) == 'C') {
          cnt++;
        }
      }
      String str1 = S.replace("A", "a");
      String str2 = str1.replace("C", "c");
      if (cnt == 1) {
        for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        }
        if (cnt2 == str2.length()) {
          ans = "AC";
        }
      }
    }
    System.out.println(ans);
  }
} Main
import java.util.*;
import java.util.Collections;
import java.util.stream.Collectors;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String ans = "WA";
    int cnt = 0;
    int cnt2 = 0;
    if (S.charAt(0) == 'A') {
      for (int i = 2; i < S.length() - 1; i++) {
        if (S.charAt(i) == 'C') {
          cnt++;
        }
      }
      String str1 = S.replace("A", "a");
      String str2 = str1.replace("C", "c");
      if (cnt == 1) {
        for (int i = 0; i < str2.length(); i++) {
          if (!Character.isLowerCase(str2.charAt(i))) {
            break;
          } else {
            cnt2++;
          }
        }
        if (cnt2 == str2.length()) {
          ans = "AC";
        }
      }
    }
    System.out.println(ans);
  }
}
