import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();

		String result = isFulfill(input) ? "AC" : "WA";
		System.out.println(result);
	}

	public static boolean isFulfill(String input) {

		int size = input.length();
		int countC = 0;
		for (int i = 0; i < size; i++) {
			if (i == 0) {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} else if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			}
		}
		if (countC == 0) {
			return false;
		}

		return true;
	}

	public static boolean checkTopCharacter(String input) {
		if (!Character.isUpperCase(input.charAt(0))) {
			return false;
		}
		if (!"A".equals(String.valueOf(input.charAt(0)))) {
			return false;
		}
		return true;
	}

	public static boolean isUpperCase(String input, int index) {
		return Character.isUpperCase(input.charAt(index));
	}

} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();

		String result = isFulfill(input) ? "AC" : "WA";
		System.out.println(result);
	}

	public static boolean isFulfill(String input) {

		int size = input.length();
		int countC = 0;
		for (int i = 0; i < size; i++) {
			if (i == 0) {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} else if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			}
		}
		if (countC == 0) {
			return false;
		}

		return true;
	}

	public static boolean checkTopCharacter(String input) {
		if (!Character.isUpperCase(input.charAt(0))) {
			return false;
		}
		if (!"A".equals(String.valueOf(input.charAt(0)))) {
			return false;
		}
		return true;
	}

	public static boolean isUpperCase(String input, int index) {
		return Character.isUpperCase(input.charAt(index));
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();

		String result = isFulfill(input) ? "AC" : "WA";
		System.out.println(result);
	} main {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();

		String result = isFulfill(input) ? "AC" : "WA";
		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.next(); input sc.next() sc.next sc String result = isFulfill(input) ? "AC" : "WA"; result isFulfill(input) ? "AC" : "WA" isFulfill(input) isFulfill input "AC" "WA" System.out.println(result) System.out.println System.out System System.out result String[] args args public static boolean isFulfill(String input) {

		int size = input.length();
		int countC = 0;
		for (int i = 0; i < size; i++) {
			if (i == 0) {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} else if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			}
		}
		if (countC == 0) {
			return false;
		}

		return true;
	} isFulfill {

		int size = input.length();
		int countC = 0;
		for (int i = 0; i < size; i++) {
			if (i == 0) {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} else if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			}
		}
		if (countC == 0) {
			return false;
		}

		return true;
	} int size = input.length(); size input.length() input.length input int countC = 0; countC 0 for (int i = 0; i < size; i++) {
			if (i == 0) {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} else if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			}
		} int i = 0; int i = 0; i 0 i < size i size i++ i++ i {
			if (i == 0) {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} else if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			}
		} {
			if (i == 0) {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} else if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			}
		} if (i == 0) {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} else if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			} i == 0 i 0 {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} if (!checkTopCharacter(input)) {
					return false;
				} !checkTopCharacter(input) checkTopCharacter(input) checkTopCharacter input {
					return false;
				} return false; false if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			} i == 1 || i == size-1 i == 1 i 1 i == size-1 i size-1 size 1 {
				if (isUpperCase(input, i)) {
					return false;
				}
			} if (isUpperCase(input, i)) {
					return false;
				} isUpperCase(input, i) isUpperCase input i {
					return false;
				} return false; false if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			} i >=2  && i < size-1 i >=2 i 2 i < size-1 i size-1 size 1 {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			} if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				} isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i))) isUpperCase(input, i) isUpperCase input i !"C".equals(String.valueOf(input.charAt(i))) "C".equals(String.valueOf(input.charAt(i))) "C".equals "C" String.valueOf(input.charAt(i)) String.valueOf String input.charAt(i) input.charAt input i {
					return false;
				} return false; false if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				} countC == 1 countC 1 {
					if (isUpperCase(input, i)) {
						return false;
					}
				} if (isUpperCase(input, i)) {
						return false;
					} isUpperCase(input, i) isUpperCase input i {
						return false;
					} return false; false if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				} isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i))) isUpperCase(input, i) isUpperCase input i "C".equals(String.valueOf(input.charAt(i))) "C".equals "C" String.valueOf(input.charAt(i)) String.valueOf String input.charAt(i) input.charAt input i {
					countC++;
					if (countC == 2) {
						return false;
					}
				} countC++ countC if (countC == 2) {
						return false;
					} countC == 2 countC 2 {
						return false;
					} return false; false if (countC == 0) {
			return false;
		} countC == 0 countC 0 {
			return false;
		} return false; false return true; true String input input public static boolean checkTopCharacter(String input) {
		if (!Character.isUpperCase(input.charAt(0))) {
			return false;
		}
		if (!"A".equals(String.valueOf(input.charAt(0)))) {
			return false;
		}
		return true;
	} checkTopCharacter {
		if (!Character.isUpperCase(input.charAt(0))) {
			return false;
		}
		if (!"A".equals(String.valueOf(input.charAt(0)))) {
			return false;
		}
		return true;
	} if (!Character.isUpperCase(input.charAt(0))) {
			return false;
		} !Character.isUpperCase(input.charAt(0)) Character.isUpperCase(input.charAt(0)) Character.isUpperCase Character input.charAt(0) input.charAt input 0 {
			return false;
		} return false; false if (!"A".equals(String.valueOf(input.charAt(0)))) {
			return false;
		} !"A".equals(String.valueOf(input.charAt(0))) "A".equals(String.valueOf(input.charAt(0))) "A".equals "A" String.valueOf(input.charAt(0)) String.valueOf String input.charAt(0) input.charAt input 0 {
			return false;
		} return false; false return true; true String input input public static boolean isUpperCase(String input, int index) {
		return Character.isUpperCase(input.charAt(index));
	} isUpperCase {
		return Character.isUpperCase(input.charAt(index));
	} return Character.isUpperCase(input.charAt(index)); Character.isUpperCase(input.charAt(index)) Character.isUpperCase Character input.charAt(index) input.charAt input index String input input int index index public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();

		String result = isFulfill(input) ? "AC" : "WA";
		System.out.println(result);
	}

	public static boolean isFulfill(String input) {

		int size = input.length();
		int countC = 0;
		for (int i = 0; i < size; i++) {
			if (i == 0) {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} else if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			}
		}
		if (countC == 0) {
			return false;
		}

		return true;
	}

	public static boolean checkTopCharacter(String input) {
		if (!Character.isUpperCase(input.charAt(0))) {
			return false;
		}
		if (!"A".equals(String.valueOf(input.charAt(0)))) {
			return false;
		}
		return true;
	}

	public static boolean isUpperCase(String input, int index) {
		return Character.isUpperCase(input.charAt(index));
	}

} public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();

		String result = isFulfill(input) ? "AC" : "WA";
		System.out.println(result);
	}

	public static boolean isFulfill(String input) {

		int size = input.length();
		int countC = 0;
		for (int i = 0; i < size; i++) {
			if (i == 0) {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} else if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			}
		}
		if (countC == 0) {
			return false;
		}

		return true;
	}

	public static boolean checkTopCharacter(String input) {
		if (!Character.isUpperCase(input.charAt(0))) {
			return false;
		}
		if (!"A".equals(String.valueOf(input.charAt(0)))) {
			return false;
		}
		return true;
	}

	public static boolean isUpperCase(String input, int index) {
		return Character.isUpperCase(input.charAt(index));
	}

} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();

		String result = isFulfill(input) ? "AC" : "WA";
		System.out.println(result);
	}

	public static boolean isFulfill(String input) {

		int size = input.length();
		int countC = 0;
		for (int i = 0; i < size; i++) {
			if (i == 0) {
				if (!checkTopCharacter(input)) {
					return false;
				}
			} else if (i == 1 || i == size-1) {
				if (isUpperCase(input, i)) {
					return false;
				}
			} else if (i >=2  && i < size-1	) {
				if (isUpperCase(input, i) && !"C".equals(String.valueOf(input.charAt(i)))) {
					return false;
				}
				if (countC == 1) {
					if (isUpperCase(input, i)) {
						return false;
					}
				}
				if (isUpperCase(input, i) && "C".equals(String.valueOf(input.charAt(i)))) {
					countC++;
					if (countC == 2) {
						return false;
					}
				}
			}
		}
		if (countC == 0) {
			return false;
		}

		return true;
	}

	public static boolean checkTopCharacter(String input) {
		if (!Character.isUpperCase(input.charAt(0))) {
			return false;
		}
		if (!"A".equals(String.valueOf(input.charAt(0)))) {
			return false;
		}
		return true;
	}

	public static boolean isUpperCase(String input, int index) {
		return Character.isUpperCase(input.charAt(index));
	}

}
