import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		String S = sc.next();
		String ans="WA";

		if(S.charAt(0)=='A') {
			int count=0;
			int index=0;
			//System.out.println("1");
			for(int i=2; i<=S.length()-2;i++) {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			}
			if(count==1) {
				//System.out.println("2");
				S=S.substring(1,index)+S.substring(index+1,S.length());
				//System.out.println(S);
				int small=0;
				for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				}
				if(small==S.length()) {
					ans="AC";
				}
			}
		}
		System.out.println(ans);

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		String S = sc.next();
		String ans="WA";

		if(S.charAt(0)=='A') {
			int count=0;
			int index=0;
			//System.out.println("1");
			for(int i=2; i<=S.length()-2;i++) {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			}
			if(count==1) {
				//System.out.println("2");
				S=S.substring(1,index)+S.substring(index+1,S.length());
				//System.out.println(S);
				int small=0;
				for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				}
				if(small==S.length()) {
					ans="AC";
				}
			}
		}
		System.out.println(ans);

	}
} Main public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		String S = sc.next();
		String ans="WA";

		if(S.charAt(0)=='A') {
			int count=0;
			int index=0;
			//System.out.println("1");
			for(int i=2; i<=S.length()-2;i++) {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			}
			if(count==1) {
				//System.out.println("2");
				S=S.substring(1,index)+S.substring(index+1,S.length());
				//System.out.println(S);
				int small=0;
				for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				}
				if(small==S.length()) {
					ans="AC";
				}
			}
		}
		System.out.println(ans);

	} main {
		Scanner sc= new Scanner(System.in);
		String S = sc.next();
		String ans="WA";

		if(S.charAt(0)=='A') {
			int count=0;
			int index=0;
			//System.out.println("1");
			for(int i=2; i<=S.length()-2;i++) {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			}
			if(count==1) {
				//System.out.println("2");
				S=S.substring(1,index)+S.substring(index+1,S.length());
				//System.out.println(S);
				int small=0;
				for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				}
				if(small==S.length()) {
					ans="AC";
				}
			}
		}
		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 String ans="WA"; ans "WA" if(S.charAt(0)=='A') {
			int count=0;
			int index=0;
			//System.out.println("1");
			for(int i=2; i<=S.length()-2;i++) {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			}
			if(count==1) {
				//System.out.println("2");
				S=S.substring(1,index)+S.substring(index+1,S.length());
				//System.out.println(S);
				int small=0;
				for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				}
				if(small==S.length()) {
					ans="AC";
				}
			}
		} S.charAt(0)=='A' S.charAt(0) S.charAt S 0 'A' {
			int count=0;
			int index=0;
			//System.out.println("1");
			for(int i=2; i<=S.length()-2;i++) {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			}
			if(count==1) {
				//System.out.println("2");
				S=S.substring(1,index)+S.substring(index+1,S.length());
				//System.out.println(S);
				int small=0;
				for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				}
				if(small==S.length()) {
					ans="AC";
				}
			}
		} int count=0; count 0 int index=0; index 0 for(int i=2; i<=S.length()-2;i++) {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			} int i=2; int i=2; i 2 i<=S.length()-2 i S.length()-2 S.length() S.length S 2 i++ i++ i {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			} {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			} if(S.charAt(i)=='C') {
					count++;
					index=i;
				} S.charAt(i)=='C' S.charAt(i) S.charAt S i 'C' {
					count++;
					index=i;
				} count++ count index=i index i if(count==1) {
				//System.out.println("2");
				S=S.substring(1,index)+S.substring(index+1,S.length());
				//System.out.println(S);
				int small=0;
				for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				}
				if(small==S.length()) {
					ans="AC";
				}
			} count==1 count 1 {
				//System.out.println("2");
				S=S.substring(1,index)+S.substring(index+1,S.length());
				//System.out.println(S);
				int small=0;
				for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				}
				if(small==S.length()) {
					ans="AC";
				}
			} S=S.substring(1,index)+S.substring(index+1,S.length()) S S.substring(1,index)+S.substring(index+1,S.length()) S.substring(1,index) S.substring S 1 index S.substring(index+1,S.length()) S.substring S index+1 index 1 S.length() S.length S int small=0; small 0 for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				} {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				} if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					} S.substring(i,i+1).matches("[a-z]") S.substring(i,i+1).matches S.substring(i,i+1) S.substring S i i+1 i 1 "[a-z]" {
						small++;
					} small++ small if(small==S.length()) {
					ans="AC";
				} small==S.length() small S.length() S.length S {
					ans="AC";
				} ans="AC" ans "AC" 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();
		String ans="WA";

		if(S.charAt(0)=='A') {
			int count=0;
			int index=0;
			//System.out.println("1");
			for(int i=2; i<=S.length()-2;i++) {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			}
			if(count==1) {
				//System.out.println("2");
				S=S.substring(1,index)+S.substring(index+1,S.length());
				//System.out.println(S);
				int small=0;
				for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				}
				if(small==S.length()) {
					ans="AC";
				}
			}
		}
		System.out.println(ans);

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		String S = sc.next();
		String ans="WA";

		if(S.charAt(0)=='A') {
			int count=0;
			int index=0;
			//System.out.println("1");
			for(int i=2; i<=S.length()-2;i++) {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			}
			if(count==1) {
				//System.out.println("2");
				S=S.substring(1,index)+S.substring(index+1,S.length());
				//System.out.println(S);
				int small=0;
				for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				}
				if(small==S.length()) {
					ans="AC";
				}
			}
		}
		System.out.println(ans);

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		String S = sc.next();
		String ans="WA";

		if(S.charAt(0)=='A') {
			int count=0;
			int index=0;
			//System.out.println("1");
			for(int i=2; i<=S.length()-2;i++) {
				if(S.charAt(i)=='C') {
					count++;
					index=i;
				}
			}
			if(count==1) {
				//System.out.println("2");
				S=S.substring(1,index)+S.substring(index+1,S.length());
				//System.out.println(S);
				int small=0;
				for(int i=0;i<S.length();i++) {
					if(S.substring(i,i+1).matches("[a-z]")) {
						small++;
					}
				}
				if(small==S.length()) {
					ans="AC";
				}
			}
		}
		System.out.println(ans);

	}
}