import java.util.*;
public class Main {
	public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
      // 取得
	  String s = sc.next();
      if(con1(s) && con2(s) && con3(s)){
        System.out.println("AC");
      }else{
        System.out.println("WA");
      }
    }
    //一つ目の条件
    static boolean con1(String s){
      if(s.charAt(0)=='A'){
        return true;
      }else{
        return false;
      }
    }
    //二つ目の条件
    static boolean con2(String s){
      int count =0;
      String str = s.substring(2,s.length()-1);
      for(int i=0;i<str.length();i++){
        if(str.charAt(i)=='C'){
          count++;
        }
      }
      if(count==1){
        return true;
      }else{
        return false;
      }
    }
    //三つ目の条件
    static boolean con3(String s){
      int count=0;
      for(int i=0;i<s.length();i++){
        if(Character.isUpperCase(s.charAt(i))){
          count++;
        }
      }
      if(count==2){
        return true;
      }else{
        return false;
      }
    }
} 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(con1(s) && con2(s) && con3(s)){
        System.out.println("AC");
      }else{
        System.out.println("WA");
      }
    }
    //一つ目の条件
    static boolean con1(String s){
      if(s.charAt(0)=='A'){
        return true;
      }else{
        return false;
      }
    }
    //二つ目の条件
    static boolean con2(String s){
      int count =0;
      String str = s.substring(2,s.length()-1);
      for(int i=0;i<str.length();i++){
        if(str.charAt(i)=='C'){
          count++;
        }
      }
      if(count==1){
        return true;
      }else{
        return false;
      }
    }
    //三つ目の条件
    static boolean con3(String s){
      int count=0;
      for(int i=0;i<s.length();i++){
        if(Character.isUpperCase(s.charAt(i))){
          count++;
        }
      }
      if(count==2){
        return true;
      }else{
        return false;
      }
    }
} Main public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
      // 取得
	  String s = sc.next();
      if(con1(s) && con2(s) && con3(s)){
        System.out.println("AC");
      }else{
        System.out.println("WA");
      }
    } main {
       Scanner sc = new Scanner(System.in);
      // 取得
	  String s = sc.next();
      if(con1(s) && con2(s) && con3(s)){
        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 if(con1(s) && con2(s) && con3(s)){
        System.out.println("AC");
      }else{
        System.out.println("WA");
      } con1(s) && con2(s) && con3(s) con1(s) && con2(s) && con3(s) con1(s) con1 s con2(s) con2 s con3(s) con3 s {
        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 //一つ目の条件
    static boolean con1(String s){
      if(s.charAt(0)=='A'){
        return true;
      }else{
        return false;
      }
    } con1 {
      if(s.charAt(0)=='A'){
        return true;
      }else{
        return false;
      }
    } if(s.charAt(0)=='A'){
        return true;
      }else{
        return false;
      } s.charAt(0)=='A' s.charAt(0) s.charAt s 0 'A' {
        return true;
      } return true; true {
        return false;
      } return false; false String s s //二つ目の条件
    static boolean con2(String s){
      int count =0;
      String str = s.substring(2,s.length()-1);
      for(int i=0;i<str.length();i++){
        if(str.charAt(i)=='C'){
          count++;
        }
      }
      if(count==1){
        return true;
      }else{
        return false;
      }
    } con2 {
      int count =0;
      String str = s.substring(2,s.length()-1);
      for(int i=0;i<str.length();i++){
        if(str.charAt(i)=='C'){
          count++;
        }
      }
      if(count==1){
        return true;
      }else{
        return false;
      }
    } int count =0; count 0 String str = s.substring(2,s.length()-1); str s.substring(2,s.length()-1) s.substring s 2 s.length()-1 s.length() s.length s 1 for(int i=0;i<str.length();i++){
        if(str.charAt(i)=='C'){
          count++;
        }
      } int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
        if(str.charAt(i)=='C'){
          count++;
        }
      } {
        if(str.charAt(i)=='C'){
          count++;
        }
      } if(str.charAt(i)=='C'){
          count++;
        } str.charAt(i)=='C' str.charAt(i) str.charAt str i 'C' {
          count++;
        } count++ count if(count==1){
        return true;
      }else{
        return false;
      } count==1 count 1 {
        return true;
      } return true; true {
        return false;
      } return false; false String s s //三つ目の条件
    static boolean con3(String s){
      int count=0;
      for(int i=0;i<s.length();i++){
        if(Character.isUpperCase(s.charAt(i))){
          count++;
        }
      }
      if(count==2){
        return true;
      }else{
        return false;
      }
    } con3 {
      int count=0;
      for(int i=0;i<s.length();i++){
        if(Character.isUpperCase(s.charAt(i))){
          count++;
        }
      }
      if(count==2){
        return true;
      }else{
        return false;
      }
    } int count=0; count 0 for(int i=0;i<s.length();i++){
        if(Character.isUpperCase(s.charAt(i))){
          count++;
        }
      } 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))){
          count++;
        }
      } {
        if(Character.isUpperCase(s.charAt(i))){
          count++;
        }
      } if(Character.isUpperCase(s.charAt(i))){
          count++;
        } Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
          count++;
        } count++ count if(count==2){
        return true;
      }else{
        return false;
      } count==2 count 2 {
        return true;
      } return true; true {
        return false;
      } return false; false String s s public class Main {
	public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
      // 取得
	  String s = sc.next();
      if(con1(s) && con2(s) && con3(s)){
        System.out.println("AC");
      }else{
        System.out.println("WA");
      }
    }
    //一つ目の条件
    static boolean con1(String s){
      if(s.charAt(0)=='A'){
        return true;
      }else{
        return false;
      }
    }
    //二つ目の条件
    static boolean con2(String s){
      int count =0;
      String str = s.substring(2,s.length()-1);
      for(int i=0;i<str.length();i++){
        if(str.charAt(i)=='C'){
          count++;
        }
      }
      if(count==1){
        return true;
      }else{
        return false;
      }
    }
    //三つ目の条件
    static boolean con3(String s){
      int count=0;
      for(int i=0;i<s.length();i++){
        if(Character.isUpperCase(s.charAt(i))){
          count++;
        }
      }
      if(count==2){
        return true;
      }else{
        return false;
      }
    }
} public class Main {
	public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
      // 取得
	  String s = sc.next();
      if(con1(s) && con2(s) && con3(s)){
        System.out.println("AC");
      }else{
        System.out.println("WA");
      }
    }
    //一つ目の条件
    static boolean con1(String s){
      if(s.charAt(0)=='A'){
        return true;
      }else{
        return false;
      }
    }
    //二つ目の条件
    static boolean con2(String s){
      int count =0;
      String str = s.substring(2,s.length()-1);
      for(int i=0;i<str.length();i++){
        if(str.charAt(i)=='C'){
          count++;
        }
      }
      if(count==1){
        return true;
      }else{
        return false;
      }
    }
    //三つ目の条件
    static boolean con3(String s){
      int count=0;
      for(int i=0;i<s.length();i++){
        if(Character.isUpperCase(s.charAt(i))){
          count++;
        }
      }
      if(count==2){
        return true;
      }else{
        return false;
      }
    }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
      // 取得
	  String s = sc.next();
      if(con1(s) && con2(s) && con3(s)){
        System.out.println("AC");
      }else{
        System.out.println("WA");
      }
    }
    //一つ目の条件
    static boolean con1(String s){
      if(s.charAt(0)=='A'){
        return true;
      }else{
        return false;
      }
    }
    //二つ目の条件
    static boolean con2(String s){
      int count =0;
      String str = s.substring(2,s.length()-1);
      for(int i=0;i<str.length();i++){
        if(str.charAt(i)=='C'){
          count++;
        }
      }
      if(count==1){
        return true;
      }else{
        return false;
      }
    }
    //三つ目の条件
    static boolean con3(String s){
      int count=0;
      for(int i=0;i<s.length();i++){
        if(Character.isUpperCase(s.charAt(i))){
          count++;
        }
      }
      if(count==2){
        return true;
      }else{
        return false;
      }
    }
}