import java.util.*;

public class Main{

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

    if (S.charAt(0) == 'A'){
      int countC = 0;

      for (int i = 2; i < S.length() - 1; i++){
        if (S.charAt(i) == 'C'){
          countC++;
        }
      }

      HashSet<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');

      if (countC == 1){

        for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        }

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

    System.out.println("WA");
    return;
  }

  static List<Integer> primeList(int n){
    List<Integer> list = new ArrayList<>();
    boolean[] prime = new boolean[n + 1];
    Arrays.fill(prime, true);
    prime[0] = false;
    prime[1] = false;
    for (int i = 2; i < Math.sqrt(n); i++){
      if (!prime[i]){continue;}
      for (int j = 2; i * j <= n; j++){
        prime[i * j] = false;
      }
    }

    for (int i = 0; i < prime.length; i++){
      if (prime[i]){list.add(i);}
    }

    return list;
  }

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

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

    if (S.charAt(0) == 'A'){
      int countC = 0;

      for (int i = 2; i < S.length() - 1; i++){
        if (S.charAt(i) == 'C'){
          countC++;
        }
      }

      HashSet<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');

      if (countC == 1){

        for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        }

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

    System.out.println("WA");
    return;
  }

  static List<Integer> primeList(int n){
    List<Integer> list = new ArrayList<>();
    boolean[] prime = new boolean[n + 1];
    Arrays.fill(prime, true);
    prime[0] = false;
    prime[1] = false;
    for (int i = 2; i < Math.sqrt(n); i++){
      if (!prime[i]){continue;}
      for (int j = 2; i * j <= n; j++){
        prime[i * j] = false;
      }
    }

    for (int i = 0; i < prime.length; i++){
      if (prime[i]){list.add(i);}
    }

    return list;
  }

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

    if (S.charAt(0) == 'A'){
      int countC = 0;

      for (int i = 2; i < S.length() - 1; i++){
        if (S.charAt(i) == 'C'){
          countC++;
        }
      }

      HashSet<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');

      if (countC == 1){

        for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        }

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

    System.out.println("WA");
    return;
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();

    if (S.charAt(0) == 'A'){
      int countC = 0;

      for (int i = 2; i < S.length() - 1; i++){
        if (S.charAt(i) == 'C'){
          countC++;
        }
      }

      HashSet<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');

      if (countC == 1){

        for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        }

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

    System.out.println("WA");
    return;
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc if (S.charAt(0) == 'A'){
      int countC = 0;

      for (int i = 2; i < S.length() - 1; i++){
        if (S.charAt(i) == 'C'){
          countC++;
        }
      }

      HashSet<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');

      if (countC == 1){

        for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        }

        System.out.println("AC");
        return;
      }
    } S.charAt(0) == 'A' S.charAt(0) S.charAt S 0 'A' {
      int countC = 0;

      for (int i = 2; i < S.length() - 1; i++){
        if (S.charAt(i) == 'C'){
          countC++;
        }
      }

      HashSet<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');

      if (countC == 1){

        for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        }

        System.out.println("AC");
        return;
      }
    } int countC = 0; countC 0 for (int i = 2; i < S.length() - 1; i++){
        if (S.charAt(i) == 'C'){
          countC++;
        }
      } 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'){
          countC++;
        }
      } {
        if (S.charAt(i) == 'C'){
          countC++;
        }
      } if (S.charAt(i) == 'C'){
          countC++;
        } S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
          countC++;
        } countC++ countC HashSet<Character> set = new HashSet<>(); set new HashSet<>() set.add('A') set.add set 'A' set.add('C') set.add set 'C' if (countC == 1){

        for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        }

        System.out.println("AC");
        return;
      } countC == 1 countC 1 {

        for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        }

        System.out.println("AC");
        return;
      } for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        } char c S.toCharArray() S.toCharArray S {
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        } {
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        } if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          } Character.isUpperCase(c) && !set.contains(c) Character.isUpperCase(c) Character.isUpperCase Character c !set.contains(c) set.contains(c) set.contains set c {
            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" return; System.out.println("WA") System.out.println System.out System System.out "WA" return; String[] args args static List<Integer> primeList(int n){
    List<Integer> list = new ArrayList<>();
    boolean[] prime = new boolean[n + 1];
    Arrays.fill(prime, true);
    prime[0] = false;
    prime[1] = false;
    for (int i = 2; i < Math.sqrt(n); i++){
      if (!prime[i]){continue;}
      for (int j = 2; i * j <= n; j++){
        prime[i * j] = false;
      }
    }

    for (int i = 0; i < prime.length; i++){
      if (prime[i]){list.add(i);}
    }

    return list;
  } primeList {
    List<Integer> list = new ArrayList<>();
    boolean[] prime = new boolean[n + 1];
    Arrays.fill(prime, true);
    prime[0] = false;
    prime[1] = false;
    for (int i = 2; i < Math.sqrt(n); i++){
      if (!prime[i]){continue;}
      for (int j = 2; i * j <= n; j++){
        prime[i * j] = false;
      }
    }

    for (int i = 0; i < prime.length; i++){
      if (prime[i]){list.add(i);}
    }

    return list;
  } List<Integer> list = new ArrayList<>(); list new ArrayList<>() boolean[] prime = new boolean[n + 1]; prime new boolean[n + 1] n + 1 n 1 Arrays.fill(prime, true) Arrays.fill Arrays prime true prime[0] = false prime[0] prime 0 false prime[1] = false prime[1] prime 1 false for (int i = 2; i < Math.sqrt(n); i++){
      if (!prime[i]){continue;}
      for (int j = 2; i * j <= n; j++){
        prime[i * j] = false;
      }
    } int i = 2; int i = 2; i 2 i < Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
      if (!prime[i]){continue;}
      for (int j = 2; i * j <= n; j++){
        prime[i * j] = false;
      }
    } {
      if (!prime[i]){continue;}
      for (int j = 2; i * j <= n; j++){
        prime[i * j] = false;
      }
    } if (!prime[i]){continue;} !prime[i] prime[i] prime i {continue;} continue; for (int j = 2; i * j <= n; j++){
        prime[i * j] = false;
      } int j = 2; int j = 2; j 2 i * j <= n i * j i j n j++ j++ j {
        prime[i * j] = false;
      } {
        prime[i * j] = false;
      } prime[i * j] = false prime[i * j] prime i * j i j false for (int i = 0; i < prime.length; i++){
      if (prime[i]){list.add(i);}
    } int i = 0; int i = 0; i 0 i < prime.length i prime.length prime prime.length i++ i++ i {
      if (prime[i]){list.add(i);}
    } {
      if (prime[i]){list.add(i);}
    } if (prime[i]){list.add(i);} prime[i] prime i {list.add(i);} list.add(i) list.add list i return list; list int n n public class Main{

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

    if (S.charAt(0) == 'A'){
      int countC = 0;

      for (int i = 2; i < S.length() - 1; i++){
        if (S.charAt(i) == 'C'){
          countC++;
        }
      }

      HashSet<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');

      if (countC == 1){

        for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        }

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

    System.out.println("WA");
    return;
  }

  static List<Integer> primeList(int n){
    List<Integer> list = new ArrayList<>();
    boolean[] prime = new boolean[n + 1];
    Arrays.fill(prime, true);
    prime[0] = false;
    prime[1] = false;
    for (int i = 2; i < Math.sqrt(n); i++){
      if (!prime[i]){continue;}
      for (int j = 2; i * j <= n; j++){
        prime[i * j] = false;
      }
    }

    for (int i = 0; i < prime.length; i++){
      if (prime[i]){list.add(i);}
    }

    return list;
  }

} public class Main{

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

    if (S.charAt(0) == 'A'){
      int countC = 0;

      for (int i = 2; i < S.length() - 1; i++){
        if (S.charAt(i) == 'C'){
          countC++;
        }
      }

      HashSet<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');

      if (countC == 1){

        for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        }

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

    System.out.println("WA");
    return;
  }

  static List<Integer> primeList(int n){
    List<Integer> list = new ArrayList<>();
    boolean[] prime = new boolean[n + 1];
    Arrays.fill(prime, true);
    prime[0] = false;
    prime[1] = false;
    for (int i = 2; i < Math.sqrt(n); i++){
      if (!prime[i]){continue;}
      for (int j = 2; i * j <= n; j++){
        prime[i * j] = false;
      }
    }

    for (int i = 0; i < prime.length; i++){
      if (prime[i]){list.add(i);}
    }

    return list;
  }

} Main
import java.util.*;

public class Main{

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

    if (S.charAt(0) == 'A'){
      int countC = 0;

      for (int i = 2; i < S.length() - 1; i++){
        if (S.charAt(i) == 'C'){
          countC++;
        }
      }

      HashSet<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');

      if (countC == 1){

        for (char c: S.toCharArray()){
          if (Character.isUpperCase(c) && !set.contains(c)){
            System.out.println("WA");
            return;
          }
        }

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

    System.out.println("WA");
    return;
  }

  static List<Integer> primeList(int n){
    List<Integer> list = new ArrayList<>();
    boolean[] prime = new boolean[n + 1];
    Arrays.fill(prime, true);
    prime[0] = false;
    prime[1] = false;
    for (int i = 2; i < Math.sqrt(n); i++){
      if (!prime[i]){continue;}
      for (int j = 2; i * j <= n; j++){
        prime[i * j] = false;
      }
    }

    for (int i = 0; i < prime.length; i++){
      if (prime[i]){list.add(i);}
    }

    return list;
  }

}
