
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String sb =br.readLine();

		if(sb.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}

		if(sb.indexOf("C") > 1 && sb.indexOf("C") < sb.length()-1) {

		}else {
			System.out.println("WA");
			return;
		}



		sb = sb.replaceFirst("A", "");
		sb = sb.replaceFirst("C", "");


		if(sb.matches("[a-z]+")) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String sb =br.readLine();

		if(sb.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}

		if(sb.indexOf("C") > 1 && sb.indexOf("C") < sb.length()-1) {

		}else {
			System.out.println("WA");
			return;
		}



		sb = sb.replaceFirst("A", "");
		sb = sb.replaceFirst("C", "");


		if(sb.matches("[a-z]+")) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String sb =br.readLine();

		if(sb.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}

		if(sb.indexOf("C") > 1 && sb.indexOf("C") < sb.length()-1) {

		}else {
			System.out.println("WA");
			return;
		}



		sb = sb.replaceFirst("A", "");
		sb = sb.replaceFirst("C", "");


		if(sb.matches("[a-z]+")) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String sb =br.readLine();

		if(sb.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}

		if(sb.indexOf("C") > 1 && sb.indexOf("C") < sb.length()-1) {

		}else {
			System.out.println("WA");
			return;
		}



		sb = sb.replaceFirst("A", "");
		sb = sb.replaceFirst("C", "");


		if(sb.matches("[a-z]+")) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String sb =br.readLine(); sb br.readLine() br.readLine br if(sb.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		} sb.charAt(0) != 'A' sb.charAt(0) sb.charAt sb 0 'A' {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; if(sb.indexOf("C") > 1 && sb.indexOf("C") < sb.length()-1) {

		}else {
			System.out.println("WA");
			return;
		} sb.indexOf("C") > 1 && sb.indexOf("C") < sb.length()-1 sb.indexOf("C") > 1 sb.indexOf("C") sb.indexOf sb "C" 1 sb.indexOf("C") < sb.length()-1 sb.indexOf("C") sb.indexOf sb "C" sb.length()-1 sb.length() sb.length sb 1 {

		} {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; sb = sb.replaceFirst("A", "") sb sb.replaceFirst("A", "") sb.replaceFirst sb "A" "" sb = sb.replaceFirst("C", "") sb sb.replaceFirst("C", "") sb.replaceFirst sb "C" "" if(sb.matches("[a-z]+")) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		} sb.matches("[a-z]+") sb.matches sb "[a-z]+" {
			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 class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String sb =br.readLine();

		if(sb.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}

		if(sb.indexOf("C") > 1 && sb.indexOf("C") < sb.length()-1) {

		}else {
			System.out.println("WA");
			return;
		}



		sb = sb.replaceFirst("A", "");
		sb = sb.replaceFirst("C", "");


		if(sb.matches("[a-z]+")) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String sb =br.readLine();

		if(sb.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}

		if(sb.indexOf("C") > 1 && sb.indexOf("C") < sb.length()-1) {

		}else {
			System.out.println("WA");
			return;
		}



		sb = sb.replaceFirst("A", "");
		sb = sb.replaceFirst("C", "");


		if(sb.matches("[a-z]+")) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

} Main

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String sb =br.readLine();

		if(sb.charAt(0) != 'A') {
			System.out.println("WA");
			return;
		}

		if(sb.indexOf("C") > 1 && sb.indexOf("C") < sb.length()-1) {

		}else {
			System.out.println("WA");
			return;
		}



		sb = sb.replaceFirst("A", "");
		sb = sb.replaceFirst("C", "");


		if(sb.matches("[a-z]+")) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

}
