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') {
        System.out.println("WA");
        return;
      }

      String subS = s.substring(Math.min(2, s.length()-1), Math.max(2, s.length()-1));
      int cnt = 0;
      int idx = -1;
      for(int i = 0; i < subS.length(); i++) {
        if(subS.charAt(i) == 'C') {
          cnt++;
          idx = i + 2;
        }
      }
      if(cnt != 1) {
        System.out.println("WA");
        return;
      }
      for(int i = 1; i < s.length(); i++) {
        if(i == idx) continue;
        if(!Character.isLowerCase(s.charAt(i))){
          System.out.println("WA");
          return;
        }
      }

      System.out.println("AC");
  }
} 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') {
        System.out.println("WA");
        return;
      }

      String subS = s.substring(Math.min(2, s.length()-1), Math.max(2, s.length()-1));
      int cnt = 0;
      int idx = -1;
      for(int i = 0; i < subS.length(); i++) {
        if(subS.charAt(i) == 'C') {
          cnt++;
          idx = i + 2;
        }
      }
      if(cnt != 1) {
        System.out.println("WA");
        return;
      }
      for(int i = 1; i < s.length(); i++) {
        if(i == idx) continue;
        if(!Character.isLowerCase(s.charAt(i))){
          System.out.println("WA");
          return;
        }
      }

      System.out.println("AC");
  }
} Main public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      if(s.charAt(0) != 'A') {
        System.out.println("WA");
        return;
      }

      String subS = s.substring(Math.min(2, s.length()-1), Math.max(2, s.length()-1));
      int cnt = 0;
      int idx = -1;
      for(int i = 0; i < subS.length(); i++) {
        if(subS.charAt(i) == 'C') {
          cnt++;
          idx = i + 2;
        }
      }
      if(cnt != 1) {
        System.out.println("WA");
        return;
      }
      for(int i = 1; i < s.length(); i++) {
        if(i == idx) continue;
        if(!Character.isLowerCase(s.charAt(i))){
          System.out.println("WA");
          return;
        }
      }

      System.out.println("AC");
  } main { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      if(s.charAt(0) != 'A') {
        System.out.println("WA");
        return;
      }

      String subS = s.substring(Math.min(2, s.length()-1), Math.max(2, s.length()-1));
      int cnt = 0;
      int idx = -1;
      for(int i = 0; i < subS.length(); i++) {
        if(subS.charAt(i) == 'C') {
          cnt++;
          idx = i + 2;
        }
      }
      if(cnt != 1) {
        System.out.println("WA");
        return;
      }
      for(int i = 1; i < s.length(); i++) {
        if(i == idx) continue;
        if(!Character.isLowerCase(s.charAt(i))){
          System.out.println("WA");
          return;
        }
      }

      System.out.println("AC");
  } 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') {
        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 subS = s.substring(Math.min(2, s.length()-1), Math.max(2, s.length()-1)); subS s.substring(Math.min(2, s.length()-1), Math.max(2, s.length()-1)) s.substring s Math.min(2, s.length()-1) Math.min Math 2 s.length()-1 s.length() s.length s 1 Math.max(2, s.length()-1) Math.max Math 2 s.length()-1 s.length() s.length s 1 int cnt = 0; cnt 0 int idx = -1; idx -1 1 for(int i = 0; i < subS.length(); i++) {
        if(subS.charAt(i) == 'C') {
          cnt++;
          idx = i + 2;
        }
      } int i = 0; int i = 0; i 0 i < subS.length() i subS.length() subS.length subS i++ i++ i {
        if(subS.charAt(i) == 'C') {
          cnt++;
          idx = i + 2;
        }
      } {
        if(subS.charAt(i) == 'C') {
          cnt++;
          idx = i + 2;
        }
      } if(subS.charAt(i) == 'C') {
          cnt++;
          idx = i + 2;
        } subS.charAt(i) == 'C' subS.charAt(i) subS.charAt subS i 'C' {
          cnt++;
          idx = i + 2;
        } cnt++ cnt idx = i + 2 idx i + 2 i 2 if(cnt != 1) {
        System.out.println("WA");
        return;
      } cnt != 1 cnt 1 {
        System.out.println("WA");
        return;
      } System.out.println("WA") System.out.println System.out System System.out "WA" return; for(int i = 1; i < s.length(); i++) {
        if(i == idx) continue;
        if(!Character.isLowerCase(s.charAt(i))){
          System.out.println("WA");
          return;
        }
      } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
        if(i == idx) continue;
        if(!Character.isLowerCase(s.charAt(i))){
          System.out.println("WA");
          return;
        }
      } {
        if(i == idx) continue;
        if(!Character.isLowerCase(s.charAt(i))){
          System.out.println("WA");
          return;
        }
      } if(i == idx) continue; i == idx i idx continue; if(!Character.isLowerCase(s.charAt(i))){
          System.out.println("WA");
          return;
        } !Character.isLowerCase(s.charAt(i)) Character.isLowerCase(s.charAt(i)) Character.isLowerCase 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 public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      if(s.charAt(0) != 'A') {
        System.out.println("WA");
        return;
      }

      String subS = s.substring(Math.min(2, s.length()-1), Math.max(2, s.length()-1));
      int cnt = 0;
      int idx = -1;
      for(int i = 0; i < subS.length(); i++) {
        if(subS.charAt(i) == 'C') {
          cnt++;
          idx = i + 2;
        }
      }
      if(cnt != 1) {
        System.out.println("WA");
        return;
      }
      for(int i = 1; i < s.length(); i++) {
        if(i == idx) continue;
        if(!Character.isLowerCase(s.charAt(i))){
          System.out.println("WA");
          return;
        }
      }

      System.out.println("AC");
  }
} public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      if(s.charAt(0) != 'A') {
        System.out.println("WA");
        return;
      }

      String subS = s.substring(Math.min(2, s.length()-1), Math.max(2, s.length()-1));
      int cnt = 0;
      int idx = -1;
      for(int i = 0; i < subS.length(); i++) {
        if(subS.charAt(i) == 'C') {
          cnt++;
          idx = i + 2;
        }
      }
      if(cnt != 1) {
        System.out.println("WA");
        return;
      }
      for(int i = 1; i < s.length(); i++) {
        if(i == idx) continue;
        if(!Character.isLowerCase(s.charAt(i))){
          System.out.println("WA");
          return;
        }
      }

      System.out.println("AC");
  }
} 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') {
        System.out.println("WA");
        return;
      }

      String subS = s.substring(Math.min(2, s.length()-1), Math.max(2, s.length()-1));
      int cnt = 0;
      int idx = -1;
      for(int i = 0; i < subS.length(); i++) {
        if(subS.charAt(i) == 'C') {
          cnt++;
          idx = i + 2;
        }
      }
      if(cnt != 1) {
        System.out.println("WA");
        return;
      }
      for(int i = 1; i < s.length(); i++) {
        if(i == idx) continue;
        if(!Character.isLowerCase(s.charAt(i))){
          System.out.println("WA");
          return;
        }
      }

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