import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(s.charAt(0) == 'A') {
			int cnt = 0;
			int index = 0;
			for(int j = 2; j < s.length() - 1; j++) {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			}
			if(cnt == 1) {
				// 大文字が含まれないかどうか
				boolean ok = true;
				for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				}
				if(ok) {
					System.out.println("AC");
					return;
				}
			}
		}
		System.out.println("WA");
	}
} 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();
		if(s.charAt(0) == 'A') {
			int cnt = 0;
			int index = 0;
			for(int j = 2; j < s.length() - 1; j++) {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			}
			if(cnt == 1) {
				// 大文字が含まれないかどうか
				boolean ok = true;
				for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				}
				if(ok) {
					System.out.println("AC");
					return;
				}
			}
		}
		System.out.println("WA");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(s.charAt(0) == 'A') {
			int cnt = 0;
			int index = 0;
			for(int j = 2; j < s.length() - 1; j++) {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			}
			if(cnt == 1) {
				// 大文字が含まれないかどうか
				boolean ok = true;
				for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				}
				if(ok) {
					System.out.println("AC");
					return;
				}
			}
		}
		System.out.println("WA");
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(s.charAt(0) == 'A') {
			int cnt = 0;
			int index = 0;
			for(int j = 2; j < s.length() - 1; j++) {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			}
			if(cnt == 1) {
				// 大文字が含まれないかどうか
				boolean ok = true;
				for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				}
				if(ok) {
					System.out.println("AC");
					return;
				}
			}
		}
		System.out.println("WA");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc if(s.charAt(0) == 'A') {
			int cnt = 0;
			int index = 0;
			for(int j = 2; j < s.length() - 1; j++) {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			}
			if(cnt == 1) {
				// 大文字が含まれないかどうか
				boolean ok = true;
				for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				}
				if(ok) {
					System.out.println("AC");
					return;
				}
			}
		} s.charAt(0) == 'A' s.charAt(0) s.charAt s 0 'A' {
			int cnt = 0;
			int index = 0;
			for(int j = 2; j < s.length() - 1; j++) {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			}
			if(cnt == 1) {
				// 大文字が含まれないかどうか
				boolean ok = true;
				for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				}
				if(ok) {
					System.out.println("AC");
					return;
				}
			}
		} int cnt = 0; cnt 0 int index = 0; index 0 for(int j = 2; j < s.length() - 1; j++) {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			} int j = 2; int j = 2; j 2 j < s.length() - 1 j s.length() - 1 s.length() s.length s 1 j++ j++ j {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			} {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			} if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				} s.charAt(j) == 'C' s.charAt(j) s.charAt s j 'C' {
					cnt++;
					index = j;
				} cnt++ cnt index = j index j if(cnt == 1) {
				// 大文字が含まれないかどうか
				boolean ok = true;
				for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				}
				if(ok) {
					System.out.println("AC");
					return;
				}
			} cnt == 1 cnt 1 {
				// 大文字が含まれないかどうか
				boolean ok = true;
				for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				}
				if(ok) {
					System.out.println("AC");
					return;
				}
			} boolean ok = true; ok true for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = 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))) ok = false;
				} {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				} if(i == index) continue; i == index i index continue; if(Character.isUpperCase(s.charAt(i))) ok = false; Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i ok = false ok false if(ok) {
					System.out.println("AC");
					return;
				} ok {
					System.out.println("AC");
					return;
				} System.out.println("AC") System.out.println System.out System System.out "AC" return; System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(s.charAt(0) == 'A') {
			int cnt = 0;
			int index = 0;
			for(int j = 2; j < s.length() - 1; j++) {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			}
			if(cnt == 1) {
				// 大文字が含まれないかどうか
				boolean ok = true;
				for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				}
				if(ok) {
					System.out.println("AC");
					return;
				}
			}
		}
		System.out.println("WA");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(s.charAt(0) == 'A') {
			int cnt = 0;
			int index = 0;
			for(int j = 2; j < s.length() - 1; j++) {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			}
			if(cnt == 1) {
				// 大文字が含まれないかどうか
				boolean ok = true;
				for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				}
				if(ok) {
					System.out.println("AC");
					return;
				}
			}
		}
		System.out.println("WA");
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(s.charAt(0) == 'A') {
			int cnt = 0;
			int index = 0;
			for(int j = 2; j < s.length() - 1; j++) {
				if(s.charAt(j) == 'C') {
					cnt++;
					index = j;
				}
			}
			if(cnt == 1) {
				// 大文字が含まれないかどうか
				boolean ok = true;
				for(int i = 1; i < s.length(); i++) {
					if(i == index) continue;
					if(Character.isUpperCase(s.charAt(i))) ok = false;
				}
				if(ok) {
					System.out.println("AC");
					return;
				}
			}
		}
		System.out.println("WA");
	}
}
