import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String s = sc.next();

		if(solve(s)) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
    }

	public static boolean solve(String s) {
		if(s.charAt(0) != 'A') return false;
		int a = 0;
		int index = 0;
		for(int i = 2; i < s.length() - 1; i++) {
			if(s.charAt(i) == 'C') {
				if(a != 0) return false;
				a++;
				index = i;
			}
		}
		if(a != 1) return false;
		for(int i = 1; i < s.length(); i++) {
			if(i == index) continue;
			if(Character.isUpperCase(s.charAt(i))) return false;
		}
		return true;
	}
} import java.util.Scanner; Scanner java.util public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String s = sc.next();

		if(solve(s)) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
    }

	public static boolean solve(String s) {
		if(s.charAt(0) != 'A') return false;
		int a = 0;
		int index = 0;
		for(int i = 2; i < s.length() - 1; i++) {
			if(s.charAt(i) == 'C') {
				if(a != 0) return false;
				a++;
				index = i;
			}
		}
		if(a != 1) return false;
		for(int i = 1; i < s.length(); i++) {
			if(i == index) continue;
			if(Character.isUpperCase(s.charAt(i))) return false;
		}
		return true;
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		String s = sc.next();

		if(solve(s)) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
    } main {
		String s = sc.next();

		if(solve(s)) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
    } String s = sc.next(); s sc.next() sc.next sc if(solve(s)) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		} solve(s) solve s {
			System.out.println("AC");
		} System.out.println("AC") System.out.println System.out System System.out "AC" {
			System.out.println("WA");
		} System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public static boolean solve(String s) {
		if(s.charAt(0) != 'A') return false;
		int a = 0;
		int index = 0;
		for(int i = 2; i < s.length() - 1; i++) {
			if(s.charAt(i) == 'C') {
				if(a != 0) return false;
				a++;
				index = i;
			}
		}
		if(a != 1) return false;
		for(int i = 1; i < s.length(); i++) {
			if(i == index) continue;
			if(Character.isUpperCase(s.charAt(i))) return false;
		}
		return true;
	} solve {
		if(s.charAt(0) != 'A') return false;
		int a = 0;
		int index = 0;
		for(int i = 2; i < s.length() - 1; i++) {
			if(s.charAt(i) == 'C') {
				if(a != 0) return false;
				a++;
				index = i;
			}
		}
		if(a != 1) return false;
		for(int i = 1; i < s.length(); i++) {
			if(i == index) continue;
			if(Character.isUpperCase(s.charAt(i))) return false;
		}
		return true;
	} if(s.charAt(0) != 'A') return false; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' return false; false int a = 0; a 0 int index = 0; index 0 for(int i = 2; i < s.length() - 1; i++) {
			if(s.charAt(i) == 'C') {
				if(a != 0) return false;
				a++;
				index = i;
			}
		} int i = 2; int i = 2; i 2 i < s.length() - 1 i s.length() - 1 s.length() s.length s 1 i++ i++ i {
			if(s.charAt(i) == 'C') {
				if(a != 0) return false;
				a++;
				index = i;
			}
		} {
			if(s.charAt(i) == 'C') {
				if(a != 0) return false;
				a++;
				index = i;
			}
		} if(s.charAt(i) == 'C') {
				if(a != 0) return false;
				a++;
				index = i;
			} s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
				if(a != 0) return false;
				a++;
				index = i;
			} if(a != 0) return false; a != 0 a 0 return false; false a++ a index = i index i if(a != 1) return false; a != 1 a 1 return false; false for(int i = 1; i < s.length(); i++) {
			if(i == index) continue;
			if(Character.isUpperCase(s.charAt(i))) return false;
		} int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
			if(i == index) continue;
			if(Character.isUpperCase(s.charAt(i))) return false;
		} {
			if(i == index) continue;
			if(Character.isUpperCase(s.charAt(i))) return false;
		} if(i == index) continue; i == index i index continue; if(Character.isUpperCase(s.charAt(i))) return false; Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i return false; false return true; true String s s public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String s = sc.next();

		if(solve(s)) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
    }

	public static boolean solve(String s) {
		if(s.charAt(0) != 'A') return false;
		int a = 0;
		int index = 0;
		for(int i = 2; i < s.length() - 1; i++) {
			if(s.charAt(i) == 'C') {
				if(a != 0) return false;
				a++;
				index = i;
			}
		}
		if(a != 1) return false;
		for(int i = 1; i < s.length(); i++) {
			if(i == index) continue;
			if(Character.isUpperCase(s.charAt(i))) return false;
		}
		return true;
	}
} public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String s = sc.next();

		if(solve(s)) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
    }

	public static boolean solve(String s) {
		if(s.charAt(0) != 'A') return false;
		int a = 0;
		int index = 0;
		for(int i = 2; i < s.length() - 1; i++) {
			if(s.charAt(i) == 'C') {
				if(a != 0) return false;
				a++;
				index = i;
			}
		}
		if(a != 1) return false;
		for(int i = 1; i < s.length(); i++) {
			if(i == index) continue;
			if(Character.isUpperCase(s.charAt(i))) return false;
		}
		return true;
	}
} Main
import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String s = sc.next();

		if(solve(s)) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
    }

	public static boolean solve(String s) {
		if(s.charAt(0) != 'A') return false;
		int a = 0;
		int index = 0;
		for(int i = 2; i < s.length() - 1; i++) {
			if(s.charAt(i) == 'C') {
				if(a != 0) return false;
				a++;
				index = i;
			}
		}
		if(a != 1) return false;
		for(int i = 1; i < s.length(); i++) {
			if(i == index) continue;
			if(Character.isUpperCase(s.charAt(i))) return false;
		}
		return true;
	}
}
