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

public class Main {
    public static void main(String[] args) throws Exception {
        String line = readLine();
        String WA = "WA";
        String AC = "AC";

        if (line.startsWith("A")) {
            if (line.substring(0, 2).indexOf("C") != -1 || line.endsWith("C") ) {
                System.out.println(WA);
                return;
            }
            if (line.replace("C", "").length() != line.length() - 1) {
                System.out.println(WA);
                return;
            }

            String str1 = line.replace("A", "");
            String str2 = str1.replace("C", "");
            if (str2.equals(str2.toLowerCase())) {
                System.out.println(AC);
            } else {
                System.out.println(WA);
            }
        } else {
            System.out.println(WA);
        }
    }

    private static String readLine() throws Exception {
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		return br.readLine();
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws Exception {
        String line = readLine();
        String WA = "WA";
        String AC = "AC";

        if (line.startsWith("A")) {
            if (line.substring(0, 2).indexOf("C") != -1 || line.endsWith("C") ) {
                System.out.println(WA);
                return;
            }
            if (line.replace("C", "").length() != line.length() - 1) {
                System.out.println(WA);
                return;
            }

            String str1 = line.replace("A", "");
            String str2 = str1.replace("C", "");
            if (str2.equals(str2.toLowerCase())) {
                System.out.println(AC);
            } else {
                System.out.println(WA);
            }
        } else {
            System.out.println(WA);
        }
    }

    private static String readLine() throws Exception {
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		return br.readLine();
	}
} Main public static void main(String[] args) throws Exception {
        String line = readLine();
        String WA = "WA";
        String AC = "AC";

        if (line.startsWith("A")) {
            if (line.substring(0, 2).indexOf("C") != -1 || line.endsWith("C") ) {
                System.out.println(WA);
                return;
            }
            if (line.replace("C", "").length() != line.length() - 1) {
                System.out.println(WA);
                return;
            }

            String str1 = line.replace("A", "");
            String str2 = str1.replace("C", "");
            if (str2.equals(str2.toLowerCase())) {
                System.out.println(AC);
            } else {
                System.out.println(WA);
            }
        } else {
            System.out.println(WA);
        }
    } main {
        String line = readLine();
        String WA = "WA";
        String AC = "AC";

        if (line.startsWith("A")) {
            if (line.substring(0, 2).indexOf("C") != -1 || line.endsWith("C") ) {
                System.out.println(WA);
                return;
            }
            if (line.replace("C", "").length() != line.length() - 1) {
                System.out.println(WA);
                return;
            }

            String str1 = line.replace("A", "");
            String str2 = str1.replace("C", "");
            if (str2.equals(str2.toLowerCase())) {
                System.out.println(AC);
            } else {
                System.out.println(WA);
            }
        } else {
            System.out.println(WA);
        }
    } String line = readLine(); line readLine() readLine String WA = "WA"; WA "WA" String AC = "AC"; AC "AC" if (line.startsWith("A")) {
            if (line.substring(0, 2).indexOf("C") != -1 || line.endsWith("C") ) {
                System.out.println(WA);
                return;
            }
            if (line.replace("C", "").length() != line.length() - 1) {
                System.out.println(WA);
                return;
            }

            String str1 = line.replace("A", "");
            String str2 = str1.replace("C", "");
            if (str2.equals(str2.toLowerCase())) {
                System.out.println(AC);
            } else {
                System.out.println(WA);
            }
        } else {
            System.out.println(WA);
        } line.startsWith("A") line.startsWith line "A" {
            if (line.substring(0, 2).indexOf("C") != -1 || line.endsWith("C") ) {
                System.out.println(WA);
                return;
            }
            if (line.replace("C", "").length() != line.length() - 1) {
                System.out.println(WA);
                return;
            }

            String str1 = line.replace("A", "");
            String str2 = str1.replace("C", "");
            if (str2.equals(str2.toLowerCase())) {
                System.out.println(AC);
            } else {
                System.out.println(WA);
            }
        } if (line.substring(0, 2).indexOf("C") != -1 || line.endsWith("C") ) {
                System.out.println(WA);
                return;
            } line.substring(0, 2).indexOf("C") != -1 || line.endsWith("C") line.substring(0, 2).indexOf("C") != -1 line.substring(0, 2).indexOf("C") line.substring(0, 2).indexOf line.substring(0, 2) line.substring line 0 2 "C" -1 1 line.endsWith("C") line.endsWith line "C" {
                System.out.println(WA);
                return;
            } System.out.println(WA) System.out.println System.out System System.out WA return; if (line.replace("C", "").length() != line.length() - 1) {
                System.out.println(WA);
                return;
            } line.replace("C", "").length() != line.length() - 1 line.replace("C", "").length() line.replace("C", "").length line.replace("C", "") line.replace line "C" "" line.length() - 1 line.length() line.length line 1 {
                System.out.println(WA);
                return;
            } System.out.println(WA) System.out.println System.out System System.out WA return; String str1 = line.replace("A", ""); str1 line.replace("A", "") line.replace line "A" "" String str2 = str1.replace("C", ""); str2 str1.replace("C", "") str1.replace str1 "C" "" if (str2.equals(str2.toLowerCase())) {
                System.out.println(AC);
            } else {
                System.out.println(WA);
            } str2.equals(str2.toLowerCase()) str2.equals str2 str2.toLowerCase() str2.toLowerCase str2 {
                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 {
            System.out.println(WA);
        } System.out.println(WA) System.out.println System.out System System.out WA String[] args args private static String readLine() throws Exception {
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		return br.readLine();
	} readLine {
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		return br.readLine();
	} BufferedReader br = new BufferedReader( new InputStreamReader(System.in)); br new BufferedReader( new InputStreamReader(System.in)) return br.readLine(); br.readLine() br.readLine br public class Main {
    public static void main(String[] args) throws Exception {
        String line = readLine();
        String WA = "WA";
        String AC = "AC";

        if (line.startsWith("A")) {
            if (line.substring(0, 2).indexOf("C") != -1 || line.endsWith("C") ) {
                System.out.println(WA);
                return;
            }
            if (line.replace("C", "").length() != line.length() - 1) {
                System.out.println(WA);
                return;
            }

            String str1 = line.replace("A", "");
            String str2 = str1.replace("C", "");
            if (str2.equals(str2.toLowerCase())) {
                System.out.println(AC);
            } else {
                System.out.println(WA);
            }
        } else {
            System.out.println(WA);
        }
    }

    private static String readLine() throws Exception {
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		return br.readLine();
	}
} public class Main {
    public static void main(String[] args) throws Exception {
        String line = readLine();
        String WA = "WA";
        String AC = "AC";

        if (line.startsWith("A")) {
            if (line.substring(0, 2).indexOf("C") != -1 || line.endsWith("C") ) {
                System.out.println(WA);
                return;
            }
            if (line.replace("C", "").length() != line.length() - 1) {
                System.out.println(WA);
                return;
            }

            String str1 = line.replace("A", "");
            String str2 = str1.replace("C", "");
            if (str2.equals(str2.toLowerCase())) {
                System.out.println(AC);
            } else {
                System.out.println(WA);
            }
        } else {
            System.out.println(WA);
        }
    }

    private static String readLine() throws Exception {
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		return br.readLine();
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        String line = readLine();
        String WA = "WA";
        String AC = "AC";

        if (line.startsWith("A")) {
            if (line.substring(0, 2).indexOf("C") != -1 || line.endsWith("C") ) {
                System.out.println(WA);
                return;
            }
            if (line.replace("C", "").length() != line.length() - 1) {
                System.out.println(WA);
                return;
            }

            String str1 = line.replace("A", "");
            String str2 = str1.replace("C", "");
            if (str2.equals(str2.toLowerCase())) {
                System.out.println(AC);
            } else {
                System.out.println(WA);
            }
        } else {
            System.out.println(WA);
        }
    }

    private static String readLine() throws Exception {
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		return br.readLine();
	}
}