import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s=sc.next();
String t=s;
boolean f=false;
int count=0;
for(int i=0;i<s.length()-3;i++){if(s.charAt(i+2)=='C')count++;}
for(char i='A';i<='Z';i++){t=t.replaceAll(String.valueOf(i), "");}
if(s.charAt(0)=='A'){
    if(count==1){
        if(t.length()==s.length()-2){
        f=true;
        }
    }
}
if(f){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();
String t=s;
boolean f=false;
int count=0;
for(int i=0;i<s.length()-3;i++){if(s.charAt(i+2)=='C')count++;}
for(char i='A';i<='Z';i++){t=t.replaceAll(String.valueOf(i), "");}
if(s.charAt(0)=='A'){
    if(count==1){
        if(t.length()==s.length()-2){
        f=true;
        }
    }
}
if(f){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();
String t=s;
boolean f=false;
int count=0;
for(int i=0;i<s.length()-3;i++){if(s.charAt(i+2)=='C')count++;}
for(char i='A';i<='Z';i++){t=t.replaceAll(String.valueOf(i), "");}
if(s.charAt(0)=='A'){
    if(count==1){
        if(t.length()==s.length()-2){
        f=true;
        }
    }
}
if(f){System.out.println("AC");}else{System.out.println("WA");}
} main {
Scanner sc = new Scanner(System.in);
String s=sc.next();
String t=s;
boolean f=false;
int count=0;
for(int i=0;i<s.length()-3;i++){if(s.charAt(i+2)=='C')count++;}
for(char i='A';i<='Z';i++){t=t.replaceAll(String.valueOf(i), "");}
if(s.charAt(0)=='A'){
    if(count==1){
        if(t.length()==s.length()-2){
        f=true;
        }
    }
}
if(f){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 String t=s; t s boolean f=false; f false int count=0; count 0 for(int i=0;i<s.length()-3;i++){if(s.charAt(i+2)=='C')count++;} int i=0; int i=0; i 0 i<s.length()-3 i s.length()-3 s.length() s.length s 3 i++ i++ i {if(s.charAt(i+2)=='C')count++;} {if(s.charAt(i+2)=='C')count++;} if(s.charAt(i+2)=='C')count++; s.charAt(i+2)=='C' s.charAt(i+2) s.charAt s i+2 i 2 'C' count++ count for(char i='A';i<='Z';i++){t=t.replaceAll(String.valueOf(i), "");} char i='A'; char i='A'; i 'A' i<='Z' i 'Z' i++ i++ i {t=t.replaceAll(String.valueOf(i), "");} {t=t.replaceAll(String.valueOf(i), "");} t=t.replaceAll(String.valueOf(i), "") t t.replaceAll(String.valueOf(i), "") t.replaceAll t String.valueOf(i) String.valueOf String i "" if(s.charAt(0)=='A'){
    if(count==1){
        if(t.length()==s.length()-2){
        f=true;
        }
    }
} s.charAt(0)=='A' s.charAt(0) s.charAt s 0 'A' {
    if(count==1){
        if(t.length()==s.length()-2){
        f=true;
        }
    }
} if(count==1){
        if(t.length()==s.length()-2){
        f=true;
        }
    } count==1 count 1 {
        if(t.length()==s.length()-2){
        f=true;
        }
    } if(t.length()==s.length()-2){
        f=true;
        } t.length()==s.length()-2 t.length() t.length t s.length()-2 s.length() s.length s 2 {
        f=true;
        } f=true f true if(f){System.out.println("AC");}else{System.out.println("WA");} f {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();
String t=s;
boolean f=false;
int count=0;
for(int i=0;i<s.length()-3;i++){if(s.charAt(i+2)=='C')count++;}
for(char i='A';i<='Z';i++){t=t.replaceAll(String.valueOf(i), "");}
if(s.charAt(0)=='A'){
    if(count==1){
        if(t.length()==s.length()-2){
        f=true;
        }
    }
}
if(f){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();
String t=s;
boolean f=false;
int count=0;
for(int i=0;i<s.length()-3;i++){if(s.charAt(i+2)=='C')count++;}
for(char i='A';i<='Z';i++){t=t.replaceAll(String.valueOf(i), "");}
if(s.charAt(0)=='A'){
    if(count==1){
        if(t.length()==s.length()-2){
        f=true;
        }
    }
}
if(f){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();
String t=s;
boolean f=false;
int count=0;
for(int i=0;i<s.length()-3;i++){if(s.charAt(i+2)=='C')count++;}
for(char i='A';i<='Z';i++){t=t.replaceAll(String.valueOf(i), "");}
if(s.charAt(0)=='A'){
    if(count==1){
        if(t.length()==s.length()-2){
        f=true;
        }
    }
}
if(f){System.out.println("AC");}else{System.out.println("WA");}
}}