import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String input = sc.next();
if(input.charAt(0) != 'A'){
System.out.println("WA");
return;
}
int ccount = 0;
int cposition = 0;
for(int i = 2; i < input.length()-1;++i){
if(input.charAt(i) == 'C'){
ccount++;
cposition = i;
}
}
if(ccount != 1){
System.out.println("WA");
return;
}
String trimStr = input.substring(1, cposition) + input.substring(cposition + 1);
if(trimStr.equals(trimStr.toLowerCase()))
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 input = sc.next();
if(input.charAt(0) != 'A'){
System.out.println("WA");
return;
}
int ccount = 0;
int cposition = 0;
for(int i = 2; i < input.length()-1;++i){
if(input.charAt(i) == 'C'){
ccount++;
cposition = i;
}
}
if(ccount != 1){
System.out.println("WA");
return;
}
String trimStr = input.substring(1, cposition) + input.substring(cposition + 1);
if(trimStr.equals(trimStr.toLowerCase()))
System.out.println("AC");
else
System.out.println("WA");

	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String input = sc.next();
if(input.charAt(0) != 'A'){
System.out.println("WA");
return;
}
int ccount = 0;
int cposition = 0;
for(int i = 2; i < input.length()-1;++i){
if(input.charAt(i) == 'C'){
ccount++;
cposition = i;
}
}
if(ccount != 1){
System.out.println("WA");
return;
}
String trimStr = input.substring(1, cposition) + input.substring(cposition + 1);
if(trimStr.equals(trimStr.toLowerCase()))
System.out.println("AC");
else
System.out.println("WA");

	} main {
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String input = sc.next();
if(input.charAt(0) != 'A'){
System.out.println("WA");
return;
}
int ccount = 0;
int cposition = 0;
for(int i = 2; i < input.length()-1;++i){
if(input.charAt(i) == 'C'){
ccount++;
cposition = i;
}
}
if(ccount != 1){
System.out.println("WA");
return;
}
String trimStr = input.substring(1, cposition) + input.substring(cposition + 1);
if(trimStr.equals(trimStr.toLowerCase()))
System.out.println("AC");
else
System.out.println("WA");

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.next(); input sc.next() sc.next sc if(input.charAt(0) != 'A'){
System.out.println("WA");
return;
} input.charAt(0) != 'A' input.charAt(0) input.charAt input 0 'A' {
System.out.println("WA");
return;
} System.out.println("WA") System.out.println System.out System System.out "WA" return; int ccount = 0; ccount 0 int cposition = 0; cposition 0 for(int i = 2; i < input.length()-1;++i){
if(input.charAt(i) == 'C'){
ccount++;
cposition = i;
}
} int i = 2; int i = 2; i 2 i < input.length()-1 i input.length()-1 input.length() input.length input 1 ++i ++i i {
if(input.charAt(i) == 'C'){
ccount++;
cposition = i;
}
} {
if(input.charAt(i) == 'C'){
ccount++;
cposition = i;
}
} if(input.charAt(i) == 'C'){
ccount++;
cposition = i;
} input.charAt(i) == 'C' input.charAt(i) input.charAt input i 'C' {
ccount++;
cposition = i;
} ccount++ ccount cposition = i cposition i if(ccount != 1){
System.out.println("WA");
return;
} ccount != 1 ccount 1 {
System.out.println("WA");
return;
} System.out.println("WA") System.out.println System.out System System.out "WA" return; String trimStr = input.substring(1, cposition) + input.substring(cposition + 1); trimStr input.substring(1, cposition) + input.substring(cposition + 1) input.substring(1, cposition) input.substring input 1 cposition input.substring(cposition + 1) input.substring input cposition + 1 cposition 1 if(trimStr.equals(trimStr.toLowerCase()))
System.out.println("AC");
else
System.out.println("WA"); trimStr.equals(trimStr.toLowerCase()) trimStr.equals trimStr trimStr.toLowerCase() trimStr.toLowerCase trimStr System.out.println("AC") System.out.println System.out System System.out "AC" 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 input = sc.next();
if(input.charAt(0) != 'A'){
System.out.println("WA");
return;
}
int ccount = 0;
int cposition = 0;
for(int i = 2; i < input.length()-1;++i){
if(input.charAt(i) == 'C'){
ccount++;
cposition = i;
}
}
if(ccount != 1){
System.out.println("WA");
return;
}
String trimStr = input.substring(1, cposition) + input.substring(cposition + 1);
if(trimStr.equals(trimStr.toLowerCase()))
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 input = sc.next();
if(input.charAt(0) != 'A'){
System.out.println("WA");
return;
}
int ccount = 0;
int cposition = 0;
for(int i = 2; i < input.length()-1;++i){
if(input.charAt(i) == 'C'){
ccount++;
cposition = i;
}
}
if(ccount != 1){
System.out.println("WA");
return;
}
String trimStr = input.substring(1, cposition) + input.substring(cposition + 1);
if(trimStr.equals(trimStr.toLowerCase()))
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 input = sc.next();
if(input.charAt(0) != 'A'){
System.out.println("WA");
return;
}
int ccount = 0;
int cposition = 0;
for(int i = 2; i < input.length()-1;++i){
if(input.charAt(i) == 'C'){
ccount++;
cposition = i;
}
}
if(ccount != 1){
System.out.println("WA");
return;
}
String trimStr = input.substring(1, cposition) + input.substring(cposition + 1);
if(trimStr.equals(trimStr.toLowerCase()))
System.out.println("AC");
else
System.out.println("WA");

	}
}