import java.util.Scanner;
public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	String str=scan.next();
	String ans="AC";
	if(str.charAt(0)!='A') {
		ans="WA";
	}
	int cc=0;
	for(int i=1;i!=str.length();i++) {
		char ch=str.charAt(i);
		if(Character.isUpperCase(ch)) {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		}
	}
	System.out.println(cc==1?ans:"WA");
}
} import java.util.Scanner; Scanner java.util public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	String str=scan.next();
	String ans="AC";
	if(str.charAt(0)!='A') {
		ans="WA";
	}
	int cc=0;
	for(int i=1;i!=str.length();i++) {
		char ch=str.charAt(i);
		if(Character.isUpperCase(ch)) {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		}
	}
	System.out.println(cc==1?ans:"WA");
}
} Main public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	String str=scan.next();
	String ans="AC";
	if(str.charAt(0)!='A') {
		ans="WA";
	}
	int cc=0;
	for(int i=1;i!=str.length();i++) {
		char ch=str.charAt(i);
		if(Character.isUpperCase(ch)) {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		}
	}
	System.out.println(cc==1?ans:"WA");
} main {
	Scanner scan=new Scanner(System.in);
	String str=scan.next();
	String ans="AC";
	if(str.charAt(0)!='A') {
		ans="WA";
	}
	int cc=0;
	for(int i=1;i!=str.length();i++) {
		char ch=str.charAt(i);
		if(Character.isUpperCase(ch)) {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		}
	}
	System.out.println(cc==1?ans:"WA");
} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) String str=scan.next(); str scan.next() scan.next scan String ans="AC"; ans "AC" if(str.charAt(0)!='A') {
		ans="WA";
	} str.charAt(0)!='A' str.charAt(0) str.charAt str 0 'A' {
		ans="WA";
	} ans="WA" ans "WA" int cc=0; cc 0 for(int i=1;i!=str.length();i++) {
		char ch=str.charAt(i);
		if(Character.isUpperCase(ch)) {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		}
	} int i=1; int i=1; i 1 i!=str.length() i str.length() str.length str i++ i++ i {
		char ch=str.charAt(i);
		if(Character.isUpperCase(ch)) {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		}
	} {
		char ch=str.charAt(i);
		if(Character.isUpperCase(ch)) {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		}
	} char ch=str.charAt(i); ch str.charAt(i) str.charAt str i if(Character.isUpperCase(ch)) {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		} Character.isUpperCase(ch) Character.isUpperCase Character ch {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		} if(ch!='C') {
			ans="WA";
			} ch!='C' ch 'C' {
			ans="WA";
			} ans="WA" ans "WA" if(i==str.length()-1) {
				ans="WA";
			} i==str.length()-1 i str.length()-1 str.length() str.length str 1 {
				ans="WA";
			} ans="WA" ans "WA" if(i==1) {
				ans="WA";
			} i==1 i 1 {
				ans="WA";
			} ans="WA" ans "WA" cc++ cc System.out.println(cc==1?ans:"WA") System.out.println System.out System System.out cc==1?ans:"WA" cc==1 cc 1 ans "WA" String[]srgs srgs public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	String str=scan.next();
	String ans="AC";
	if(str.charAt(0)!='A') {
		ans="WA";
	}
	int cc=0;
	for(int i=1;i!=str.length();i++) {
		char ch=str.charAt(i);
		if(Character.isUpperCase(ch)) {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		}
	}
	System.out.println(cc==1?ans:"WA");
}
} public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	String str=scan.next();
	String ans="AC";
	if(str.charAt(0)!='A') {
		ans="WA";
	}
	int cc=0;
	for(int i=1;i!=str.length();i++) {
		char ch=str.charAt(i);
		if(Character.isUpperCase(ch)) {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		}
	}
	System.out.println(cc==1?ans:"WA");
}
} Main
import java.util.Scanner;
public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	String str=scan.next();
	String ans="AC";
	if(str.charAt(0)!='A') {
		ans="WA";
	}
	int cc=0;
	for(int i=1;i!=str.length();i++) {
		char ch=str.charAt(i);
		if(Character.isUpperCase(ch)) {
			if(ch!='C') {
			ans="WA";
			}
			if(i==str.length()-1) {
				ans="WA";
			}
			if(i==1) {
				ans="WA";
			}
			cc++;
		}
	}
	System.out.println(cc==1?ans:"WA");
}
}