import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int f = 0;
    if(!((String.valueOf(s.charAt(0))).equals("A"))) f++;
    int p = 0;
    int q = 0;
    for(int i = 2; i < s.length() - 1; i++) {
      if((String.valueOf(s.charAt(i))).equals("C")) {
        p++;
        q = i;
      }
    }
    if(p != 1) f++;
    for(int i = 1; i < s.length(); i++) {
      if(q != i) {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      }
    }
    String ans = "AC";
    if(f > 0) ans = "WA";
    System.out.println(ans);
  }
} 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 f = 0;
    if(!((String.valueOf(s.charAt(0))).equals("A"))) f++;
    int p = 0;
    int q = 0;
    for(int i = 2; i < s.length() - 1; i++) {
      if((String.valueOf(s.charAt(i))).equals("C")) {
        p++;
        q = i;
      }
    }
    if(p != 1) f++;
    for(int i = 1; i < s.length(); i++) {
      if(q != i) {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      }
    }
    String ans = "AC";
    if(f > 0) ans = "WA";
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int f = 0;
    if(!((String.valueOf(s.charAt(0))).equals("A"))) f++;
    int p = 0;
    int q = 0;
    for(int i = 2; i < s.length() - 1; i++) {
      if((String.valueOf(s.charAt(i))).equals("C")) {
        p++;
        q = i;
      }
    }
    if(p != 1) f++;
    for(int i = 1; i < s.length(); i++) {
      if(q != i) {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      }
    }
    String ans = "AC";
    if(f > 0) ans = "WA";
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int f = 0;
    if(!((String.valueOf(s.charAt(0))).equals("A"))) f++;
    int p = 0;
    int q = 0;
    for(int i = 2; i < s.length() - 1; i++) {
      if((String.valueOf(s.charAt(i))).equals("C")) {
        p++;
        q = i;
      }
    }
    if(p != 1) f++;
    for(int i = 1; i < s.length(); i++) {
      if(q != i) {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      }
    }
    String ans = "AC";
    if(f > 0) ans = "WA";
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int f = 0; f 0 if(!((String.valueOf(s.charAt(0))).equals("A"))) f++; !((String.valueOf(s.charAt(0))).equals("A")) ((String.valueOf(s.charAt(0))).equals("A")) (String.valueOf(s.charAt(0))).equals (String.valueOf(s.charAt(0))) String.valueOf String s.charAt(0) s.charAt s 0 "A" f++ f int p = 0; p 0 int q = 0; q 0 for(int i = 2; i < s.length() - 1; i++) {
      if((String.valueOf(s.charAt(i))).equals("C")) {
        p++;
        q = i;
      }
    } 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((String.valueOf(s.charAt(i))).equals("C")) {
        p++;
        q = i;
      }
    } {
      if((String.valueOf(s.charAt(i))).equals("C")) {
        p++;
        q = i;
      }
    } if((String.valueOf(s.charAt(i))).equals("C")) {
        p++;
        q = i;
      } (String.valueOf(s.charAt(i))).equals("C") (String.valueOf(s.charAt(i))).equals (String.valueOf(s.charAt(i))) String.valueOf String s.charAt(i) s.charAt s i "C" {
        p++;
        q = i;
      } p++ p q = i q i if(p != 1) f++; p != 1 p 1 f++ f for(int i = 1; i < s.length(); i++) {
      if(q != i) {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      }
    } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
      if(q != i) {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      }
    } {
      if(q != i) {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      }
    } if(q != i) {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      } q != i q i {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      } String a = (String.valueOf(s.charAt(i))).toLowerCase(); a (String.valueOf(s.charAt(i))).toLowerCase() (String.valueOf(s.charAt(i))).toLowerCase (String.valueOf(s.charAt(i))) String.valueOf String s.charAt(i) s.charAt s i if(!(a.equals(String.valueOf(s.charAt(i))))) f++; !(a.equals(String.valueOf(s.charAt(i)))) (a.equals(String.valueOf(s.charAt(i)))) a.equals a String.valueOf(s.charAt(i)) String.valueOf String s.charAt(i) s.charAt s i f++ f String ans = "AC"; ans "AC" if(f > 0) ans = "WA"; f > 0 f 0 ans = "WA" ans "WA" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int f = 0;
    if(!((String.valueOf(s.charAt(0))).equals("A"))) f++;
    int p = 0;
    int q = 0;
    for(int i = 2; i < s.length() - 1; i++) {
      if((String.valueOf(s.charAt(i))).equals("C")) {
        p++;
        q = i;
      }
    }
    if(p != 1) f++;
    for(int i = 1; i < s.length(); i++) {
      if(q != i) {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      }
    }
    String ans = "AC";
    if(f > 0) ans = "WA";
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int f = 0;
    if(!((String.valueOf(s.charAt(0))).equals("A"))) f++;
    int p = 0;
    int q = 0;
    for(int i = 2; i < s.length() - 1; i++) {
      if((String.valueOf(s.charAt(i))).equals("C")) {
        p++;
        q = i;
      }
    }
    if(p != 1) f++;
    for(int i = 1; i < s.length(); i++) {
      if(q != i) {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      }
    }
    String ans = "AC";
    if(f > 0) ans = "WA";
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int f = 0;
    if(!((String.valueOf(s.charAt(0))).equals("A"))) f++;
    int p = 0;
    int q = 0;
    for(int i = 2; i < s.length() - 1; i++) {
      if((String.valueOf(s.charAt(i))).equals("C")) {
        p++;
        q = i;
      }
    }
    if(p != 1) f++;
    for(int i = 1; i < s.length(); i++) {
      if(q != i) {
        String a = (String.valueOf(s.charAt(i))).toLowerCase();
        if(!(a.equals(String.valueOf(s.charAt(i))))) f++;
      }
    }
    String ans = "AC";
    if(f > 0) ans = "WA";
    System.out.println(ans);
  }
}