import java.util.*;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c = new char[s.length()];
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < s.length(); i++) {
      c[i] = s.charAt(i);
    }

    if (c[0] != 'A') {
      System.out.println("WA");
      return;
    }

    for (int i = 2; i < c.length-1; i++) {
      if (c[i] == 'C') {
        count1++;
      }
    }

    for (int i = 0; i < c.length; i++) {
      if (c[i] >= 'A' && c[i] <= 'Z'){
        count2++;
      }
    }


    if (count1 == 1 && count2 == 2) {
      System.out.println("AC");
    } 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();
    char[] c = new char[s.length()];
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < s.length(); i++) {
      c[i] = s.charAt(i);
    }

    if (c[0] != 'A') {
      System.out.println("WA");
      return;
    }

    for (int i = 2; i < c.length-1; i++) {
      if (c[i] == 'C') {
        count1++;
      }
    }

    for (int i = 0; i < c.length; i++) {
      if (c[i] >= 'A' && c[i] <= 'Z'){
        count2++;
      }
    }


    if (count1 == 1 && count2 == 2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c = new char[s.length()];
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < s.length(); i++) {
      c[i] = s.charAt(i);
    }

    if (c[0] != 'A') {
      System.out.println("WA");
      return;
    }

    for (int i = 2; i < c.length-1; i++) {
      if (c[i] == 'C') {
        count1++;
      }
    }

    for (int i = 0; i < c.length; i++) {
      if (c[i] >= 'A' && c[i] <= 'Z'){
        count2++;
      }
    }


    if (count1 == 1 && count2 == 2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c = new char[s.length()];
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < s.length(); i++) {
      c[i] = s.charAt(i);
    }

    if (c[0] != 'A') {
      System.out.println("WA");
      return;
    }

    for (int i = 2; i < c.length-1; i++) {
      if (c[i] == 'C') {
        count1++;
      }
    }

    for (int i = 0; i < c.length; i++) {
      if (c[i] >= 'A' && c[i] <= 'Z'){
        count2++;
      }
    }


    if (count1 == 1 && count2 == 2) {
      System.out.println("AC");
    } 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 char[] c = new char[s.length()]; c new char[s.length()] s.length() s.length s int count1 = 0; count1 0 int count2 = 0; count2 0 for (int i = 0; i < s.length(); i++) {
      c[i] = s.charAt(i);
    } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
      c[i] = s.charAt(i);
    } {
      c[i] = s.charAt(i);
    } c[i] = s.charAt(i) c[i] c i s.charAt(i) s.charAt s i if (c[0] != 'A') {
      System.out.println("WA");
      return;
    } c[0] != 'A' c[0] c 0 'A' {
      System.out.println("WA");
      return;
    } System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i = 2; i < c.length-1; i++) {
      if (c[i] == 'C') {
        count1++;
      }
    } int i = 2; int i = 2; i 2 i < c.length-1 i c.length-1 c.length c c.length 1 i++ i++ i {
      if (c[i] == 'C') {
        count1++;
      }
    } {
      if (c[i] == 'C') {
        count1++;
      }
    } if (c[i] == 'C') {
        count1++;
      } c[i] == 'C' c[i] c i 'C' {
        count1++;
      } count1++ count1 for (int i = 0; i < c.length; i++) {
      if (c[i] >= 'A' && c[i] <= 'Z'){
        count2++;
      }
    } int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
      if (c[i] >= 'A' && c[i] <= 'Z'){
        count2++;
      }
    } {
      if (c[i] >= 'A' && c[i] <= 'Z'){
        count2++;
      }
    } if (c[i] >= 'A' && c[i] <= 'Z'){
        count2++;
      } c[i] >= 'A' && c[i] <= 'Z' c[i] >= 'A' c[i] c i 'A' c[i] <= 'Z' c[i] c i 'Z' {
        count2++;
      } count2++ count2 if (count1 == 1 && count2 == 2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    } count1 == 1 && count2 == 2 count1 == 1 count1 1 count2 == 2 count2 2 {
      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 public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c = new char[s.length()];
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < s.length(); i++) {
      c[i] = s.charAt(i);
    }

    if (c[0] != 'A') {
      System.out.println("WA");
      return;
    }

    for (int i = 2; i < c.length-1; i++) {
      if (c[i] == 'C') {
        count1++;
      }
    }

    for (int i = 0; i < c.length; i++) {
      if (c[i] >= 'A' && c[i] <= 'Z'){
        count2++;
      }
    }


    if (count1 == 1 && count2 == 2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
} public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c = new char[s.length()];
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < s.length(); i++) {
      c[i] = s.charAt(i);
    }

    if (c[0] != 'A') {
      System.out.println("WA");
      return;
    }

    for (int i = 2; i < c.length-1; i++) {
      if (c[i] == 'C') {
        count1++;
      }
    }

    for (int i = 0; i < c.length; i++) {
      if (c[i] >= 'A' && c[i] <= 'Z'){
        count2++;
      }
    }


    if (count1 == 1 && count2 == 2) {
      System.out.println("AC");
    } 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();
    char[] c = new char[s.length()];
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < s.length(); i++) {
      c[i] = s.charAt(i);
    }

    if (c[0] != 'A') {
      System.out.println("WA");
      return;
    }

    for (int i = 2; i < c.length-1; i++) {
      if (c[i] == 'C') {
        count1++;
      }
    }

    for (int i = 0; i < c.length; i++) {
      if (c[i] >= 'A' && c[i] <= 'Z'){
        count2++;
      }
    }


    if (count1 == 1 && count2 == 2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
}
