import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scannerS = new Scanner(System.in);
		String s = scannerS.nextLine();

		char s0 = s.charAt(0);
		String ss = s.substring(2, s.length() - 1);
		char sl[] = s.toCharArray();
		int lower = 0;


		for (int i = 0; i < s.length(); i++) {
			if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++;
		}
		//      System.out.println(lower);

		//	    System.out.println(ss);


		int count = 0;
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C')
				count++;
		}

		//	    System.out.println(count);

		if (s0 == 'A' && count == 1 && lower==s.length()-2) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scannerS = new Scanner(System.in);
		String s = scannerS.nextLine();

		char s0 = s.charAt(0);
		String ss = s.substring(2, s.length() - 1);
		char sl[] = s.toCharArray();
		int lower = 0;


		for (int i = 0; i < s.length(); i++) {
			if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++;
		}
		//      System.out.println(lower);

		//	    System.out.println(ss);


		int count = 0;
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C')
				count++;
		}

		//	    System.out.println(count);

		if (s0 == 'A' && count == 1 && lower==s.length()-2) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scannerS = new Scanner(System.in);
		String s = scannerS.nextLine();

		char s0 = s.charAt(0);
		String ss = s.substring(2, s.length() - 1);
		char sl[] = s.toCharArray();
		int lower = 0;


		for (int i = 0; i < s.length(); i++) {
			if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++;
		}
		//      System.out.println(lower);

		//	    System.out.println(ss);


		int count = 0;
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C')
				count++;
		}

		//	    System.out.println(count);

		if (s0 == 'A' && count == 1 && lower==s.length()-2) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	} main {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scannerS = new Scanner(System.in);
		String s = scannerS.nextLine();

		char s0 = s.charAt(0);
		String ss = s.substring(2, s.length() - 1);
		char sl[] = s.toCharArray();
		int lower = 0;


		for (int i = 0; i < s.length(); i++) {
			if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++;
		}
		//      System.out.println(lower);

		//	    System.out.println(ss);


		int count = 0;
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C')
				count++;
		}

		//	    System.out.println(count);

		if (s0 == 'A' && count == 1 && lower==s.length()-2) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	} Scanner scannerS = new Scanner(System.in); scannerS new Scanner(System.in) String s = scannerS.nextLine(); s scannerS.nextLine() scannerS.nextLine scannerS char s0 = s.charAt(0); s0 s.charAt(0) s.charAt s 0 String ss = s.substring(2, s.length() - 1); ss s.substring(2, s.length() - 1) s.substring s 2 s.length() - 1 s.length() s.length s 1 char sl[] = s.toCharArray(); sl s.toCharArray() s.toCharArray s int lower = 0; lower 0 for (int i = 0; i < s.length(); i++) {
			if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++;
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++;
		} {
			if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++;
		} if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++; sl[i] <= 'z' && sl[i] >= 'a' sl[i] <= 'z' sl[i] sl i 'z' sl[i] >= 'a' sl[i] sl i 'a' lower++ lower int count = 0; count 0 for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C')
				count++;
		} int i = 0; int i = 0; i 0 i < ss.length() i ss.length() ss.length ss i++ i++ i {
			if (ss.charAt(i) == 'C')
				count++;
		} {
			if (ss.charAt(i) == 'C')
				count++;
		} if (ss.charAt(i) == 'C')
				count++; ss.charAt(i) == 'C' ss.charAt(i) ss.charAt ss i 'C' count++ count if (s0 == 'A' && count == 1 && lower==s.length()-2) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		} s0 == 'A' && count == 1 && lower==s.length()-2 s0 == 'A' && count == 1 && lower==s.length()-2 s0 == 'A' s0 'A' count == 1 count 1 lower==s.length()-2 lower s.length()-2 s.length() s.length s 2 {
			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) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scannerS = new Scanner(System.in);
		String s = scannerS.nextLine();

		char s0 = s.charAt(0);
		String ss = s.substring(2, s.length() - 1);
		char sl[] = s.toCharArray();
		int lower = 0;


		for (int i = 0; i < s.length(); i++) {
			if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++;
		}
		//      System.out.println(lower);

		//	    System.out.println(ss);


		int count = 0;
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C')
				count++;
		}

		//	    System.out.println(count);

		if (s0 == 'A' && count == 1 && lower==s.length()-2) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scannerS = new Scanner(System.in);
		String s = scannerS.nextLine();

		char s0 = s.charAt(0);
		String ss = s.substring(2, s.length() - 1);
		char sl[] = s.toCharArray();
		int lower = 0;


		for (int i = 0; i < s.length(); i++) {
			if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++;
		}
		//      System.out.println(lower);

		//	    System.out.println(ss);


		int count = 0;
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C')
				count++;
		}

		//	    System.out.println(count);

		if (s0 == 'A' && count == 1 && lower==s.length()-2) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scannerS = new Scanner(System.in);
		String s = scannerS.nextLine();

		char s0 = s.charAt(0);
		String ss = s.substring(2, s.length() - 1);
		char sl[] = s.toCharArray();
		int lower = 0;


		for (int i = 0; i < s.length(); i++) {
			if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++;
		}
		//      System.out.println(lower);

		//	    System.out.println(ss);


		int count = 0;
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C')
				count++;
		}

		//	    System.out.println(count);

		if (s0 == 'A' && count == 1 && lower==s.length()-2) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

}