import java.util.*;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int fnd = 0;
    if (s.charAt(0) == 'A') {
      if (Character.isLowerCase(s.charAt(1))) {
        for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        }
        if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");}
      } else {System.out.println("WA");}
    } else {System.out.println("WA");}
  }
} 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 fnd = 0;
    if (s.charAt(0) == 'A') {
      if (Character.isLowerCase(s.charAt(1))) {
        for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        }
        if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");}
      } else {System.out.println("WA");}
    } else {System.out.println("WA");}
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int fnd = 0;
    if (s.charAt(0) == 'A') {
      if (Character.isLowerCase(s.charAt(1))) {
        for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        }
        if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");}
      } else {System.out.println("WA");}
    } else {System.out.println("WA");}
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int fnd = 0;
    if (s.charAt(0) == 'A') {
      if (Character.isLowerCase(s.charAt(1))) {
        for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        }
        if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");}
      } else {System.out.println("WA");}
    } else {System.out.println("WA");}
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int fnd = 0; fnd 0 if (s.charAt(0) == 'A') {
      if (Character.isLowerCase(s.charAt(1))) {
        for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        }
        if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");}
      } else {System.out.println("WA");}
    } else {System.out.println("WA");} s.charAt(0) == 'A' s.charAt(0) s.charAt s 0 'A' {
      if (Character.isLowerCase(s.charAt(1))) {
        for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        }
        if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");}
      } else {System.out.println("WA");}
    } if (Character.isLowerCase(s.charAt(1))) {
        for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        }
        if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");}
      } else {System.out.println("WA");} Character.isLowerCase(s.charAt(1)) Character.isLowerCase Character s.charAt(1) s.charAt s 1 {
        for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        }
        if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");}
      } for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        } 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') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        } {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        } if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          } s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' { fnd++;
          } fnd++ fnd 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; if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");} fnd==1 fnd 1 {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");} Character.isLowerCase(s.charAt(s.length()-1)) Character.isLowerCase Character s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 {
            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" {System.out.println("WA");} System.out.println("WA") System.out.println System.out System System.out "WA" {System.out.println("WA");} System.out.println("WA") System.out.println System.out System System.out "WA" {System.out.println("WA");} System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int fnd = 0;
    if (s.charAt(0) == 'A') {
      if (Character.isLowerCase(s.charAt(1))) {
        for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        }
        if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");}
      } else {System.out.println("WA");}
    } else {System.out.println("WA");}
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int fnd = 0;
    if (s.charAt(0) == 'A') {
      if (Character.isLowerCase(s.charAt(1))) {
        for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        }
        if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");}
      } else {System.out.println("WA");}
    } else {System.out.println("WA");}
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int fnd = 0;
    if (s.charAt(0) == 'A') {
      if (Character.isLowerCase(s.charAt(1))) {
        for (int i=2;i<s.length()-1;i++) {
          if (s.charAt(i)=='C') { fnd++;
          } else if (Character.isUpperCase(s.charAt(i))) {
            System.out.println("WA"); return;
          }
        }
        if (fnd==1) {
          if (Character.isLowerCase(s.charAt(s.length()-1))) {
            System.out.println("AC");
          } else {System.out.println("WA");}
        } else {System.out.println("WA");}
      } else {System.out.println("WA");}
    } else {System.out.println("WA");}
  }
}
