import java.util.Scanner;

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

    char[] chars = s.toCharArray();
    if (check(chars)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }

  static boolean check(char[] s) {
    if (s[0] != 'A') return false;
    int numC = 0;
    for (int i = 1; i < s.length; i++) {
      if (i >= 2 && i <= s.length - 2 && s[i] == 'C') {
        numC++;
        continue;
      }
      if (s[i] < 'a' || s[i] > 'z') {
        return false;
      }
    }
    return numC == 1;
  }
} import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.next();

    char[] chars = s.toCharArray();
    if (check(chars)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }

  static boolean check(char[] s) {
    if (s[0] != 'A') return false;
    int numC = 0;
    for (int i = 1; i < s.length; i++) {
      if (i >= 2 && i <= s.length - 2 && s[i] == 'C') {
        numC++;
        continue;
      }
      if (s[i] < 'a' || s[i] > 'z') {
        return false;
      }
    }
    return numC == 1;
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.next();

    char[] chars = s.toCharArray();
    if (check(chars)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  } main {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.next();

    char[] chars = s.toCharArray();
    if (check(chars)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.next(); s scanner.next() scanner.next scanner char[] chars = s.toCharArray(); chars s.toCharArray() s.toCharArray s if (check(chars)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    } check(chars) check chars {
      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 static boolean check(char[] s) {
    if (s[0] != 'A') return false;
    int numC = 0;
    for (int i = 1; i < s.length; i++) {
      if (i >= 2 && i <= s.length - 2 && s[i] == 'C') {
        numC++;
        continue;
      }
      if (s[i] < 'a' || s[i] > 'z') {
        return false;
      }
    }
    return numC == 1;
  } check {
    if (s[0] != 'A') return false;
    int numC = 0;
    for (int i = 1; i < s.length; i++) {
      if (i >= 2 && i <= s.length - 2 && s[i] == 'C') {
        numC++;
        continue;
      }
      if (s[i] < 'a' || s[i] > 'z') {
        return false;
      }
    }
    return numC == 1;
  } if (s[0] != 'A') return false; s[0] != 'A' s[0] s 0 'A' return false; false int numC = 0; numC 0 for (int i = 1; i < s.length; i++) {
      if (i >= 2 && i <= s.length - 2 && s[i] == 'C') {
        numC++;
        continue;
      }
      if (s[i] < 'a' || s[i] > 'z') {
        return false;
      }
    } int i = 1; int i = 1; i 1 i < s.length i s.length s s.length i++ i++ i {
      if (i >= 2 && i <= s.length - 2 && s[i] == 'C') {
        numC++;
        continue;
      }
      if (s[i] < 'a' || s[i] > 'z') {
        return false;
      }
    } {
      if (i >= 2 && i <= s.length - 2 && s[i] == 'C') {
        numC++;
        continue;
      }
      if (s[i] < 'a' || s[i] > 'z') {
        return false;
      }
    } if (i >= 2 && i <= s.length - 2 && s[i] == 'C') {
        numC++;
        continue;
      } i >= 2 && i <= s.length - 2 && s[i] == 'C' i >= 2 && i <= s.length - 2 && s[i] == 'C' i >= 2 i 2 i <= s.length - 2 i s.length - 2 s.length s s.length 2 s[i] == 'C' s[i] s i 'C' {
        numC++;
        continue;
      } numC++ numC continue; if (s[i] < 'a' || s[i] > 'z') {
        return false;
      } s[i] < 'a' || s[i] > 'z' s[i] < 'a' s[i] s i 'a' s[i] > 'z' s[i] s i 'z' {
        return false;
      } return false; false return numC == 1; numC == 1 numC 1 char[] s s
import java.util.Scanner;

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

    char[] chars = s.toCharArray();
    if (check(chars)) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }

  static boolean check(char[] s) {
    if (s[0] != 'A') return false;
    int numC = 0;
    for (int i = 1; i < s.length; i++) {
      if (i >= 2 && i <= s.length - 2 && s[i] == 'C') {
        numC++;
        continue;
      }
      if (s[i] < 'a' || s[i] > 'z') {
        return false;
      }
    }
    return numC == 1;
  }
}