import java.util.Scanner;

public class Main {
	static String original;
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String S = reader.next();
		boolean flag = true;
		String ans;

		if (S.charAt(0) != 'A') {
			flag = false;
		}

		int C_index = S.indexOf('C');
		if (S.indexOf('C') > S.length() - 2 || S.indexOf('C') < 2) {
			flag = false;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i != C_index && Character.isUpperCase(S.charAt(i))) {
				flag = false;
			}
		}
		
		if (flag) {
			ans = "AC";
		} else {
			ans = "WA";
		}

		System.out.print(ans);
	}


} import java.util.Scanner; Scanner java.util public class Main {
	static String original;
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String S = reader.next();
		boolean flag = true;
		String ans;

		if (S.charAt(0) != 'A') {
			flag = false;
		}

		int C_index = S.indexOf('C');
		if (S.indexOf('C') > S.length() - 2 || S.indexOf('C') < 2) {
			flag = false;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i != C_index && Character.isUpperCase(S.charAt(i))) {
				flag = false;
			}
		}
		
		if (flag) {
			ans = "AC";
		} else {
			ans = "WA";
		}

		System.out.print(ans);
	}


} Main static String original; original public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String S = reader.next();
		boolean flag = true;
		String ans;

		if (S.charAt(0) != 'A') {
			flag = false;
		}

		int C_index = S.indexOf('C');
		if (S.indexOf('C') > S.length() - 2 || S.indexOf('C') < 2) {
			flag = false;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i != C_index && Character.isUpperCase(S.charAt(i))) {
				flag = false;
			}
		}
		
		if (flag) {
			ans = "AC";
		} else {
			ans = "WA";
		}

		System.out.print(ans);
	} main {
		Scanner reader = new Scanner(System.in);
		String S = reader.next();
		boolean flag = true;
		String ans;

		if (S.charAt(0) != 'A') {
			flag = false;
		}

		int C_index = S.indexOf('C');
		if (S.indexOf('C') > S.length() - 2 || S.indexOf('C') < 2) {
			flag = false;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i != C_index && Character.isUpperCase(S.charAt(i))) {
				flag = false;
			}
		}
		
		if (flag) {
			ans = "AC";
		} else {
			ans = "WA";
		}

		System.out.print(ans);
	} Scanner reader = new Scanner(System.in); reader new Scanner(System.in) String S = reader.next(); S reader.next() reader.next reader boolean flag = true; flag true String ans; ans if (S.charAt(0) != 'A') {
			flag = false;
		} S.charAt(0) != 'A' S.charAt(0) S.charAt S 0 'A' {
			flag = false;
		} flag = false flag false int C_index = S.indexOf('C'); C_index S.indexOf('C') S.indexOf S 'C' if (S.indexOf('C') > S.length() - 2 || S.indexOf('C') < 2) {
			flag = false;
		} S.indexOf('C') > S.length() - 2 || S.indexOf('C') < 2 S.indexOf('C') > S.length() - 2 S.indexOf('C') S.indexOf S 'C' S.length() - 2 S.length() S.length S 2 S.indexOf('C') < 2 S.indexOf('C') S.indexOf S 'C' 2 {
			flag = false;
		} flag = false flag false for (int i = 1; i < S.length(); i++) {
			if (i != C_index && Character.isUpperCase(S.charAt(i))) {
				flag = false;
			}
		} int i = 1; int i = 1; i 1 i < S.length() i S.length() S.length S i++ i++ i {
			if (i != C_index && Character.isUpperCase(S.charAt(i))) {
				flag = false;
			}
		} {
			if (i != C_index && Character.isUpperCase(S.charAt(i))) {
				flag = false;
			}
		} if (i != C_index && Character.isUpperCase(S.charAt(i))) {
				flag = false;
			} i != C_index && Character.isUpperCase(S.charAt(i)) i != C_index i C_index Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
				flag = false;
			} flag = false flag false if (flag) {
			ans = "AC";
		} else {
			ans = "WA";
		} flag {
			ans = "AC";
		} ans = "AC" ans "AC" {
			ans = "WA";
		} ans = "WA" ans "WA" System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main {
	static String original;
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String S = reader.next();
		boolean flag = true;
		String ans;

		if (S.charAt(0) != 'A') {
			flag = false;
		}

		int C_index = S.indexOf('C');
		if (S.indexOf('C') > S.length() - 2 || S.indexOf('C') < 2) {
			flag = false;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i != C_index && Character.isUpperCase(S.charAt(i))) {
				flag = false;
			}
		}
		
		if (flag) {
			ans = "AC";
		} else {
			ans = "WA";
		}

		System.out.print(ans);
	}


} public class Main {
	static String original;
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String S = reader.next();
		boolean flag = true;
		String ans;

		if (S.charAt(0) != 'A') {
			flag = false;
		}

		int C_index = S.indexOf('C');
		if (S.indexOf('C') > S.length() - 2 || S.indexOf('C') < 2) {
			flag = false;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i != C_index && Character.isUpperCase(S.charAt(i))) {
				flag = false;
			}
		}
		
		if (flag) {
			ans = "AC";
		} else {
			ans = "WA";
		}

		System.out.print(ans);
	}


} Main
import java.util.Scanner;

public class Main {
	static String original;
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String S = reader.next();
		boolean flag = true;
		String ans;

		if (S.charAt(0) != 'A') {
			flag = false;
		}

		int C_index = S.indexOf('C');
		if (S.indexOf('C') > S.length() - 2 || S.indexOf('C') < 2) {
			flag = false;
		}

		for (int i = 1; i < S.length(); i++) {
			if (i != C_index && Character.isUpperCase(S.charAt(i))) {
				flag = false;
			}
		}
		
		if (flag) {
			ans = "AC";
		} else {
			ans = "WA";
		}

		System.out.print(ans);
	}


}
