import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		String ans="AC";
		if(s[0]!='A') ans="WA";
		int count = 0;
		for(int i=1; i<s.length;i++) {
			char c = s[i];
			if(i>1 && i<s.length-1 && c=='C') {
				count++;
				continue;
			}
			if(!Character.isLowerCase(c)) ans="WA";
		}
		if(count!=1)ans="WA";
		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);
		char[] s = sc.next().toCharArray();
		String ans="AC";
		if(s[0]!='A') ans="WA";
		int count = 0;
		for(int i=1; i<s.length;i++) {
			char c = s[i];
			if(i>1 && i<s.length-1 && c=='C') {
				count++;
				continue;
			}
			if(!Character.isLowerCase(c)) ans="WA";
		}
		if(count!=1)ans="WA";
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		String ans="AC";
		if(s[0]!='A') ans="WA";
		int count = 0;
		for(int i=1; i<s.length;i++) {
			char c = s[i];
			if(i>1 && i<s.length-1 && c=='C') {
				count++;
				continue;
			}
			if(!Character.isLowerCase(c)) ans="WA";
		}
		if(count!=1)ans="WA";
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		String ans="AC";
		if(s[0]!='A') ans="WA";
		int count = 0;
		for(int i=1; i<s.length;i++) {
			char c = s[i];
			if(i>1 && i<s.length-1 && c=='C') {
				count++;
				continue;
			}
			if(!Character.isLowerCase(c)) ans="WA";
		}
		if(count!=1)ans="WA";
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc String ans="AC"; ans "AC" if(s[0]!='A') ans="WA"; s[0]!='A' s[0] s 0 'A' ans="WA" ans "WA" int count = 0; count 0 for(int i=1; i<s.length;i++) {
			char c = s[i];
			if(i>1 && i<s.length-1 && c=='C') {
				count++;
				continue;
			}
			if(!Character.isLowerCase(c)) ans="WA";
		} int i=1; int i=1; i 1 i<s.length i s.length s s.length i++ i++ i {
			char c = s[i];
			if(i>1 && i<s.length-1 && c=='C') {
				count++;
				continue;
			}
			if(!Character.isLowerCase(c)) ans="WA";
		} {
			char c = s[i];
			if(i>1 && i<s.length-1 && c=='C') {
				count++;
				continue;
			}
			if(!Character.isLowerCase(c)) ans="WA";
		} char c = s[i]; c s[i] s i if(i>1 && i<s.length-1 && c=='C') {
				count++;
				continue;
			} i>1 && i<s.length-1 && c=='C' i>1 && i<s.length-1 && c=='C' i>1 i 1 i<s.length-1 i s.length-1 s.length s s.length 1 c=='C' c 'C' {
				count++;
				continue;
			} count++ count continue; if(!Character.isLowerCase(c)) ans="WA"; !Character.isLowerCase(c) Character.isLowerCase(c) Character.isLowerCase Character c ans="WA" ans "WA" if(count!=1)ans="WA"; count!=1 count 1 ans="WA" ans "WA" 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);
		char[] s = sc.next().toCharArray();
		String ans="AC";
		if(s[0]!='A') ans="WA";
		int count = 0;
		for(int i=1; i<s.length;i++) {
			char c = s[i];
			if(i>1 && i<s.length-1 && c=='C') {
				count++;
				continue;
			}
			if(!Character.isLowerCase(c)) ans="WA";
		}
		if(count!=1)ans="WA";
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		String ans="AC";
		if(s[0]!='A') ans="WA";
		int count = 0;
		for(int i=1; i<s.length;i++) {
			char c = s[i];
			if(i>1 && i<s.length-1 && c=='C') {
				count++;
				continue;
			}
			if(!Character.isLowerCase(c)) ans="WA";
		}
		if(count!=1)ans="WA";
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		String ans="AC";
		if(s[0]!='A') ans="WA";
		int count = 0;
		for(int i=1; i<s.length;i++) {
			char c = s[i];
			if(i>1 && i<s.length-1 && c=='C') {
				count++;
				continue;
			}
			if(!Character.isLowerCase(c)) ans="WA";
		}
		if(count!=1)ans="WA";
		System.out.println(ans);
	}
}
