import java.util.*;
import java.io.*;

class Main {
  public static void main(String[] args) throws Exception{
    try (Scanner sc = new Scanner(System.in)){
      String S = sc.next();
      if (S.charAt(0) != 'A'){
        System.out.println("WA");
        return;
      }
      String sub = S.substring(2, S.length()-1);
      int count = 0;
      for (int i = 0; i < sub.length(); i++) {
        if (sub.charAt(i) == 'C') count++;
      }
      if (count != 1) {
        System.out.println("WA");
        return;
      }
      S = S.replace("A", "");
      S = S.replace("C", "");
      for (int i = 0; i < S.length(); i++) {
        if (Character.isUpperCase(S.charAt(i))) {
          System.out.println("WA");
          return;
        }
      }
      System.out.println("AC");
    }
  }
} import java.util.*; util.* java import java.io.*; io.* java class Main {
  public static void main(String[] args) throws Exception{
    try (Scanner sc = new Scanner(System.in)){
      String S = sc.next();
      if (S.charAt(0) != 'A'){
        System.out.println("WA");
        return;
      }
      String sub = S.substring(2, S.length()-1);
      int count = 0;
      for (int i = 0; i < sub.length(); i++) {
        if (sub.charAt(i) == 'C') count++;
      }
      if (count != 1) {
        System.out.println("WA");
        return;
      }
      S = S.replace("A", "");
      S = S.replace("C", "");
      for (int i = 0; i < S.length(); i++) {
        if (Character.isUpperCase(S.charAt(i))) {
          System.out.println("WA");
          return;
        }
      }
      System.out.println("AC");
    }
  }
} Main public static void main(String[] args) throws Exception{
    try (Scanner sc = new Scanner(System.in)){
      String S = sc.next();
      if (S.charAt(0) != 'A'){
        System.out.println("WA");
        return;
      }
      String sub = S.substring(2, S.length()-1);
      int count = 0;
      for (int i = 0; i < sub.length(); i++) {
        if (sub.charAt(i) == 'C') count++;
      }
      if (count != 1) {
        System.out.println("WA");
        return;
      }
      S = S.replace("A", "");
      S = S.replace("C", "");
      for (int i = 0; i < S.length(); i++) {
        if (Character.isUpperCase(S.charAt(i))) {
          System.out.println("WA");
          return;
        }
      }
      System.out.println("AC");
    }
  } main {
    try (Scanner sc = new Scanner(System.in)){
      String S = sc.next();
      if (S.charAt(0) != 'A'){
        System.out.println("WA");
        return;
      }
      String sub = S.substring(2, S.length()-1);
      int count = 0;
      for (int i = 0; i < sub.length(); i++) {
        if (sub.charAt(i) == 'C') count++;
      }
      if (count != 1) {
        System.out.println("WA");
        return;
      }
      S = S.replace("A", "");
      S = S.replace("C", "");
      for (int i = 0; i < S.length(); i++) {
        if (Character.isUpperCase(S.charAt(i))) {
          System.out.println("WA");
          return;
        }
      }
      System.out.println("AC");
    }
  } try (Scanner sc = new Scanner(System.in)){
      String S = sc.next();
      if (S.charAt(0) != 'A'){
        System.out.println("WA");
        return;
      }
      String sub = S.substring(2, S.length()-1);
      int count = 0;
      for (int i = 0; i < sub.length(); i++) {
        if (sub.charAt(i) == 'C') count++;
      }
      if (count != 1) {
        System.out.println("WA");
        return;
      }
      S = S.replace("A", "");
      S = S.replace("C", "");
      for (int i = 0; i < S.length(); i++) {
        if (Character.isUpperCase(S.charAt(i))) {
          System.out.println("WA");
          return;
        }
      }
      System.out.println("AC");
    } {
      String S = sc.next();
      if (S.charAt(0) != 'A'){
        System.out.println("WA");
        return;
      }
      String sub = S.substring(2, S.length()-1);
      int count = 0;
      for (int i = 0; i < sub.length(); i++) {
        if (sub.charAt(i) == 'C') count++;
      }
      if (count != 1) {
        System.out.println("WA");
        return;
      }
      S = S.replace("A", "");
      S = S.replace("C", "");
      for (int i = 0; i < S.length(); i++) {
        if (Character.isUpperCase(S.charAt(i))) {
          System.out.println("WA");
          return;
        }
      }
      System.out.println("AC");
    } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc if (S.charAt(0) != 'A'){
        System.out.println("WA");
        return;
      } S.charAt(0) != 'A' S.charAt(0) S.charAt S 0 'A' {
        System.out.println("WA");
        return;
      } System.out.println("WA") System.out.println System.out System System.out "WA" return; String sub = S.substring(2, S.length()-1); sub S.substring(2, S.length()-1) S.substring S 2 S.length()-1 S.length() S.length S 1 int count = 0; count 0 for (int i = 0; i < sub.length(); i++) {
        if (sub.charAt(i) == 'C') count++;
      } int i = 0; int i = 0; i 0 i < sub.length() i sub.length() sub.length sub i++ i++ i {
        if (sub.charAt(i) == 'C') count++;
      } {
        if (sub.charAt(i) == 'C') count++;
      } if (sub.charAt(i) == 'C') count++; sub.charAt(i) == 'C' sub.charAt(i) sub.charAt sub i 'C' count++ count if (count != 1) {
        System.out.println("WA");
        return;
      } count != 1 count 1 {
        System.out.println("WA");
        return;
      } System.out.println("WA") System.out.println System.out System System.out "WA" return; S = S.replace("A", "") S S.replace("A", "") S.replace S "A" "" S = S.replace("C", "") S S.replace("C", "") S.replace S "C" "" for (int i = 0; i < S.length(); i++) {
        if (Character.isUpperCase(S.charAt(i))) {
          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 {
        if (Character.isUpperCase(S.charAt(i))) {
          System.out.println("WA");
          return;
        }
      } {
        if (Character.isUpperCase(S.charAt(i))) {
          System.out.println("WA");
          return;
        }
      } if (Character.isUpperCase(S.charAt(i))) {
          System.out.println("WA");
          return;
        } Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
          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
import java.util.*;
import java.io.*;

class Main {
  public static void main(String[] args) throws Exception{
    try (Scanner sc = new Scanner(System.in)){
      String S = sc.next();
      if (S.charAt(0) != 'A'){
        System.out.println("WA");
        return;
      }
      String sub = S.substring(2, S.length()-1);
      int count = 0;
      for (int i = 0; i < sub.length(); i++) {
        if (sub.charAt(i) == 'C') count++;
      }
      if (count != 1) {
        System.out.println("WA");
        return;
      }
      S = S.replace("A", "");
      S = S.replace("C", "");
      for (int i = 0; i < S.length(); i++) {
        if (Character.isUpperCase(S.charAt(i))) {
          System.out.println("WA");
          return;
        }
      }
      System.out.println("AC");
    }
  }
}
