import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String s = sc.next();
		
		sc.close();

		if(!s.startsWith("A")) {
			out.println("WA");
			return;
		}
		
		int n=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i) == 'C') {
				n++;
			}
		}
		if(n!=1) {
			out.println("WA");
			return;
		}
		
		String s2 = s.substring(1,s.length()-1).replace('C', 'c') + s.substring(s.length()-1);
		if(!s2.equals(s2.toLowerCase())){
			out.println("WA");
			return;
		}
		
		out.println("AC");
		
	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String s = sc.next();
		
		sc.close();

		if(!s.startsWith("A")) {
			out.println("WA");
			return;
		}
		
		int n=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i) == 'C') {
				n++;
			}
		}
		if(n!=1) {
			out.println("WA");
			return;
		}
		
		String s2 = s.substring(1,s.length()-1).replace('C', 'c') + s.substring(s.length()-1);
		if(!s2.equals(s2.toLowerCase())){
			out.println("WA");
			return;
		}
		
		out.println("AC");
		
	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} Main InputStream in = System.in; in System.in System System.in PrintStream out = System.out; out System.out System System.out public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String s = sc.next();
		
		sc.close();

		if(!s.startsWith("A")) {
			out.println("WA");
			return;
		}
		
		int n=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i) == 'C') {
				n++;
			}
		}
		if(n!=1) {
			out.println("WA");
			return;
		}
		
		String s2 = s.substring(1,s.length()-1).replace('C', 'c') + s.substring(s.length()-1);
		if(!s2.equals(s2.toLowerCase())){
			out.println("WA");
			return;
		}
		
		out.println("AC");
		
	} _main {
		Scanner sc = new Scanner(in);

		String s = sc.next();
		
		sc.close();

		if(!s.startsWith("A")) {
			out.println("WA");
			return;
		}
		
		int n=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i) == 'C') {
				n++;
			}
		}
		if(n!=1) {
			out.println("WA");
			return;
		}
		
		String s2 = s.substring(1,s.length()-1).replace('C', 'c') + s.substring(s.length()-1);
		if(!s2.equals(s2.toLowerCase())){
			out.println("WA");
			return;
		}
		
		out.println("AC");
		
	} Scanner sc = new Scanner(in); sc new Scanner(in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc if(!s.startsWith("A")) {
			out.println("WA");
			return;
		} !s.startsWith("A") s.startsWith("A") s.startsWith s "A" {
			out.println("WA");
			return;
		} out.println("WA") out.println out "WA" return; int n=0; n 0 for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i) == 'C') {
				n++;
			}
		} 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') {
				n++;
			}
		} {
			if(s.charAt(i) == 'C') {
				n++;
			}
		} if(s.charAt(i) == 'C') {
				n++;
			} s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
				n++;
			} n++ n if(n!=1) {
			out.println("WA");
			return;
		} n!=1 n 1 {
			out.println("WA");
			return;
		} out.println("WA") out.println out "WA" return; String s2 = s.substring(1,s.length()-1).replace('C', 'c') + s.substring(s.length()-1); s2 s.substring(1,s.length()-1).replace('C', 'c') + s.substring(s.length()-1) s.substring(1,s.length()-1).replace('C', 'c') s.substring(1,s.length()-1).replace s.substring(1,s.length()-1) s.substring s 1 s.length()-1 s.length() s.length s 1 'C' 'c' s.substring(s.length()-1) s.substring s s.length()-1 s.length() s.length s 1 if(!s2.equals(s2.toLowerCase())){
			out.println("WA");
			return;
		} !s2.equals(s2.toLowerCase()) s2.equals(s2.toLowerCase()) s2.equals s2 s2.toLowerCase() s2.toLowerCase s2 {
			out.println("WA");
			return;
		} out.println("WA") out.println out "WA" return; out.println("AC") out.println out "AC" String[] args args public static void main(String[] args) {
		new Main()._main(args);
	} main {
		new Main()._main(args);
	} new Main()._main(args) new Main()._main new Main() args String[] args args public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String s = sc.next();
		
		sc.close();

		if(!s.startsWith("A")) {
			out.println("WA");
			return;
		}
		
		int n=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i) == 'C') {
				n++;
			}
		}
		if(n!=1) {
			out.println("WA");
			return;
		}
		
		String s2 = s.substring(1,s.length()-1).replace('C', 'c') + s.substring(s.length()-1);
		if(!s2.equals(s2.toLowerCase())){
			out.println("WA");
			return;
		}
		
		out.println("AC");
		
	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String s = sc.next();
		
		sc.close();

		if(!s.startsWith("A")) {
			out.println("WA");
			return;
		}
		
		int n=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i) == 'C') {
				n++;
			}
		}
		if(n!=1) {
			out.println("WA");
			return;
		}
		
		String s2 = s.substring(1,s.length()-1).replace('C', 'c') + s.substring(s.length()-1);
		if(!s2.equals(s2.toLowerCase())){
			out.println("WA");
			return;
		}
		
		out.println("AC");
		
	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String s = sc.next();
		
		sc.close();

		if(!s.startsWith("A")) {
			out.println("WA");
			return;
		}
		
		int n=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i) == 'C') {
				n++;
			}
		}
		if(n!=1) {
			out.println("WA");
			return;
		}
		
		String s2 = s.substring(1,s.length()-1).replace('C', 'c') + s.substring(s.length()-1);
		if(!s2.equals(s2.toLowerCase())){
			out.println("WA");
			return;
		}
		
		out.println("AC");
		
	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

}
