import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		final String s = sc.next();

		final String sList[] = s.split("");

		if (!sList[0].equals("A")) {
			java.lang.System.out.println("WA");
			return;
		}

		int count = 2;
		final int maxcount = s.length() - 2;
		List<String> list = new ArrayList<String>();
		while (count <= maxcount) {
			list.add(sList[count]);
			count++;
		}
		int cCount = 0;
		for (final String item : list) {
			if (item.equals("C")) {
				cCount++;
			}
		}
		if (cCount > 1 || cCount == 0) {
			java.lang.System.out.println("WA");
			return;
		}

		int upperCount = 0;
		for (final String item2 : sList) {
			if (Character.isUpperCase(item2.charAt(0))) {
				upperCount++;
			}

		}

		if (upperCount > 2) {
			java.lang.System.out.println("WA");
			return;
		}

		java.lang.System.out.println("AC");

	}

} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		final String s = sc.next();

		final String sList[] = s.split("");

		if (!sList[0].equals("A")) {
			java.lang.System.out.println("WA");
			return;
		}

		int count = 2;
		final int maxcount = s.length() - 2;
		List<String> list = new ArrayList<String>();
		while (count <= maxcount) {
			list.add(sList[count]);
			count++;
		}
		int cCount = 0;
		for (final String item : list) {
			if (item.equals("C")) {
				cCount++;
			}
		}
		if (cCount > 1 || cCount == 0) {
			java.lang.System.out.println("WA");
			return;
		}

		int upperCount = 0;
		for (final String item2 : sList) {
			if (Character.isUpperCase(item2.charAt(0))) {
				upperCount++;
			}

		}

		if (upperCount > 2) {
			java.lang.System.out.println("WA");
			return;
		}

		java.lang.System.out.println("AC");

	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		final String s = sc.next();

		final String sList[] = s.split("");

		if (!sList[0].equals("A")) {
			java.lang.System.out.println("WA");
			return;
		}

		int count = 2;
		final int maxcount = s.length() - 2;
		List<String> list = new ArrayList<String>();
		while (count <= maxcount) {
			list.add(sList[count]);
			count++;
		}
		int cCount = 0;
		for (final String item : list) {
			if (item.equals("C")) {
				cCount++;
			}
		}
		if (cCount > 1 || cCount == 0) {
			java.lang.System.out.println("WA");
			return;
		}

		int upperCount = 0;
		for (final String item2 : sList) {
			if (Character.isUpperCase(item2.charAt(0))) {
				upperCount++;
			}

		}

		if (upperCount > 2) {
			java.lang.System.out.println("WA");
			return;
		}

		java.lang.System.out.println("AC");

	} main {

		Scanner sc = new Scanner(System.in);

		final String s = sc.next();

		final String sList[] = s.split("");

		if (!sList[0].equals("A")) {
			java.lang.System.out.println("WA");
			return;
		}

		int count = 2;
		final int maxcount = s.length() - 2;
		List<String> list = new ArrayList<String>();
		while (count <= maxcount) {
			list.add(sList[count]);
			count++;
		}
		int cCount = 0;
		for (final String item : list) {
			if (item.equals("C")) {
				cCount++;
			}
		}
		if (cCount > 1 || cCount == 0) {
			java.lang.System.out.println("WA");
			return;
		}

		int upperCount = 0;
		for (final String item2 : sList) {
			if (Character.isUpperCase(item2.charAt(0))) {
				upperCount++;
			}

		}

		if (upperCount > 2) {
			java.lang.System.out.println("WA");
			return;
		}

		java.lang.System.out.println("AC");

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final String s = sc.next(); s sc.next() sc.next sc final String sList[] = s.split(""); sList s.split("") s.split s "" if (!sList[0].equals("A")) {
			java.lang.System.out.println("WA");
			return;
		} !sList[0].equals("A") sList[0].equals("A") sList[0].equals sList[0] sList 0 "A" {
			java.lang.System.out.println("WA");
			return;
		} java.lang.System.out.println("WA") java.lang.System.out.println java.lang.System.out java.lang.System java.lang java java.lang java.lang.System java.lang.System.out "WA" return; int count = 2; count 2 final int maxcount = s.length() - 2; maxcount s.length() - 2 s.length() s.length s 2 List<String> list = new ArrayList<String>(); list new ArrayList<String>() while (count <= maxcount) {
			list.add(sList[count]);
			count++;
		} count <= maxcount count maxcount {
			list.add(sList[count]);
			count++;
		} list.add(sList[count]) list.add list sList[count] sList count count++ count int cCount = 0; cCount 0 for (final String item : list) {
			if (item.equals("C")) {
				cCount++;
			}
		} final String item list {
			if (item.equals("C")) {
				cCount++;
			}
		} {
			if (item.equals("C")) {
				cCount++;
			}
		} if (item.equals("C")) {
				cCount++;
			} item.equals("C") item.equals item "C" {
				cCount++;
			} cCount++ cCount if (cCount > 1 || cCount == 0) {
			java.lang.System.out.println("WA");
			return;
		} cCount > 1 || cCount == 0 cCount > 1 cCount 1 cCount == 0 cCount 0 {
			java.lang.System.out.println("WA");
			return;
		} java.lang.System.out.println("WA") java.lang.System.out.println java.lang.System.out java.lang.System java.lang java java.lang java.lang.System java.lang.System.out "WA" return; int upperCount = 0; upperCount 0 for (final String item2 : sList) {
			if (Character.isUpperCase(item2.charAt(0))) {
				upperCount++;
			}

		} final String item2 sList {
			if (Character.isUpperCase(item2.charAt(0))) {
				upperCount++;
			}

		} {
			if (Character.isUpperCase(item2.charAt(0))) {
				upperCount++;
			}

		} if (Character.isUpperCase(item2.charAt(0))) {
				upperCount++;
			} Character.isUpperCase(item2.charAt(0)) Character.isUpperCase Character item2.charAt(0) item2.charAt item2 0 {
				upperCount++;
			} upperCount++ upperCount if (upperCount > 2) {
			java.lang.System.out.println("WA");
			return;
		} upperCount > 2 upperCount 2 {
			java.lang.System.out.println("WA");
			return;
		} java.lang.System.out.println("WA") java.lang.System.out.println java.lang.System.out java.lang.System java.lang java java.lang java.lang.System java.lang.System.out "WA" return; java.lang.System.out.println("AC") java.lang.System.out.println java.lang.System.out java.lang.System java.lang java java.lang java.lang.System java.lang.System.out "AC" String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		final String s = sc.next();

		final String sList[] = s.split("");

		if (!sList[0].equals("A")) {
			java.lang.System.out.println("WA");
			return;
		}

		int count = 2;
		final int maxcount = s.length() - 2;
		List<String> list = new ArrayList<String>();
		while (count <= maxcount) {
			list.add(sList[count]);
			count++;
		}
		int cCount = 0;
		for (final String item : list) {
			if (item.equals("C")) {
				cCount++;
			}
		}
		if (cCount > 1 || cCount == 0) {
			java.lang.System.out.println("WA");
			return;
		}

		int upperCount = 0;
		for (final String item2 : sList) {
			if (Character.isUpperCase(item2.charAt(0))) {
				upperCount++;
			}

		}

		if (upperCount > 2) {
			java.lang.System.out.println("WA");
			return;
		}

		java.lang.System.out.println("AC");

	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		final String s = sc.next();

		final String sList[] = s.split("");

		if (!sList[0].equals("A")) {
			java.lang.System.out.println("WA");
			return;
		}

		int count = 2;
		final int maxcount = s.length() - 2;
		List<String> list = new ArrayList<String>();
		while (count <= maxcount) {
			list.add(sList[count]);
			count++;
		}
		int cCount = 0;
		for (final String item : list) {
			if (item.equals("C")) {
				cCount++;
			}
		}
		if (cCount > 1 || cCount == 0) {
			java.lang.System.out.println("WA");
			return;
		}

		int upperCount = 0;
		for (final String item2 : sList) {
			if (Character.isUpperCase(item2.charAt(0))) {
				upperCount++;
			}

		}

		if (upperCount > 2) {
			java.lang.System.out.println("WA");
			return;
		}

		java.lang.System.out.println("AC");

	}

} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		final String s = sc.next();

		final String sList[] = s.split("");

		if (!sList[0].equals("A")) {
			java.lang.System.out.println("WA");
			return;
		}

		int count = 2;
		final int maxcount = s.length() - 2;
		List<String> list = new ArrayList<String>();
		while (count <= maxcount) {
			list.add(sList[count]);
			count++;
		}
		int cCount = 0;
		for (final String item : list) {
			if (item.equals("C")) {
				cCount++;
			}
		}
		if (cCount > 1 || cCount == 0) {
			java.lang.System.out.println("WA");
			return;
		}

		int upperCount = 0;
		for (final String item2 : sList) {
			if (Character.isUpperCase(item2.charAt(0))) {
				upperCount++;
			}

		}

		if (upperCount > 2) {
			java.lang.System.out.println("WA");
			return;
		}

		java.lang.System.out.println("AC");

	}

}
