import java.util.Scanner;

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

        sc.close();

        String a = s.substring(0, 1);
        String c = s.substring(2, s.length() - 1);
        String rep = s.replaceAll("A", "");
        rep = rep.replaceAll("C", "");

        boolean flg = true;

        if (!a.equals("A")) {
            flg = false;
        }

        int count = 0;
        for (int i = 0; i < c.length(); i++) {
            if (c.charAt(i) == 'C') {
                count++;
            }
        }
        if (count != 1) {
            flg = false;
        }

        String low = rep.toLowerCase();
        if (!rep.equals(low)) {
            flg = false;
        }

        if (flg) {
            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) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        sc.close();

        String a = s.substring(0, 1);
        String c = s.substring(2, s.length() - 1);
        String rep = s.replaceAll("A", "");
        rep = rep.replaceAll("C", "");

        boolean flg = true;

        if (!a.equals("A")) {
            flg = false;
        }

        int count = 0;
        for (int i = 0; i < c.length(); i++) {
            if (c.charAt(i) == 'C') {
                count++;
            }
        }
        if (count != 1) {
            flg = false;
        }

        String low = rep.toLowerCase();
        if (!rep.equals(low)) {
            flg = false;
        }

        if (flg) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        sc.close();

        String a = s.substring(0, 1);
        String c = s.substring(2, s.length() - 1);
        String rep = s.replaceAll("A", "");
        rep = rep.replaceAll("C", "");

        boolean flg = true;

        if (!a.equals("A")) {
            flg = false;
        }

        int count = 0;
        for (int i = 0; i < c.length(); i++) {
            if (c.charAt(i) == 'C') {
                count++;
            }
        }
        if (count != 1) {
            flg = false;
        }

        String low = rep.toLowerCase();
        if (!rep.equals(low)) {
            flg = false;
        }

        if (flg) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        sc.close();

        String a = s.substring(0, 1);
        String c = s.substring(2, s.length() - 1);
        String rep = s.replaceAll("A", "");
        rep = rep.replaceAll("C", "");

        boolean flg = true;

        if (!a.equals("A")) {
            flg = false;
        }

        int count = 0;
        for (int i = 0; i < c.length(); i++) {
            if (c.charAt(i) == 'C') {
                count++;
            }
        }
        if (count != 1) {
            flg = false;
        }

        String low = rep.toLowerCase();
        if (!rep.equals(low)) {
            flg = false;
        }

        if (flg) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc String a = s.substring(0, 1); a s.substring(0, 1) s.substring s 0 1 String c = s.substring(2, s.length() - 1); c s.substring(2, s.length() - 1) s.substring s 2 s.length() - 1 s.length() s.length s 1 String rep = s.replaceAll("A", ""); rep s.replaceAll("A", "") s.replaceAll s "A" "" rep = rep.replaceAll("C", "") rep rep.replaceAll("C", "") rep.replaceAll rep "C" "" boolean flg = true; flg true if (!a.equals("A")) {
            flg = false;
        } !a.equals("A") a.equals("A") a.equals a "A" {
            flg = false;
        } flg = false flg false int count = 0; count 0 for (int i = 0; i < c.length(); i++) {
            if (c.charAt(i) == 'C') {
                count++;
            }
        } int i = 0; int i = 0; i 0 i < c.length() i c.length() c.length c i++ i++ i {
            if (c.charAt(i) == 'C') {
                count++;
            }
        } {
            if (c.charAt(i) == 'C') {
                count++;
            }
        } if (c.charAt(i) == 'C') {
                count++;
            } c.charAt(i) == 'C' c.charAt(i) c.charAt c i 'C' {
                count++;
            } count++ count if (count != 1) {
            flg = false;
        } count != 1 count 1 {
            flg = false;
        } flg = false flg false String low = rep.toLowerCase(); low rep.toLowerCase() rep.toLowerCase rep if (!rep.equals(low)) {
            flg = false;
        } !rep.equals(low) rep.equals(low) rep.equals rep low {
            flg = false;
        } flg = false flg false if (flg) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        } flg {
            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) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        sc.close();

        String a = s.substring(0, 1);
        String c = s.substring(2, s.length() - 1);
        String rep = s.replaceAll("A", "");
        rep = rep.replaceAll("C", "");

        boolean flg = true;

        if (!a.equals("A")) {
            flg = false;
        }

        int count = 0;
        for (int i = 0; i < c.length(); i++) {
            if (c.charAt(i) == 'C') {
                count++;
            }
        }
        if (count != 1) {
            flg = false;
        }

        String low = rep.toLowerCase();
        if (!rep.equals(low)) {
            flg = false;
        }

        if (flg) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        sc.close();

        String a = s.substring(0, 1);
        String c = s.substring(2, s.length() - 1);
        String rep = s.replaceAll("A", "");
        rep = rep.replaceAll("C", "");

        boolean flg = true;

        if (!a.equals("A")) {
            flg = false;
        }

        int count = 0;
        for (int i = 0; i < c.length(); i++) {
            if (c.charAt(i) == 'C') {
                count++;
            }
        }
        if (count != 1) {
            flg = false;
        }

        String low = rep.toLowerCase();
        if (!rep.equals(low)) {
            flg = false;
        }

        if (flg) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
} Main
import java.util.Scanner;

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

        sc.close();

        String a = s.substring(0, 1);
        String c = s.substring(2, s.length() - 1);
        String rep = s.replaceAll("A", "");
        rep = rep.replaceAll("C", "");

        boolean flg = true;

        if (!a.equals("A")) {
            flg = false;
        }

        int count = 0;
        for (int i = 0; i < c.length(); i++) {
            if (c.charAt(i) == 'C') {
                count++;
            }
        }
        if (count != 1) {
            flg = false;
        }

        String low = rep.toLowerCase();
        if (!rep.equals(low)) {
            flg = false;
        }

        if (flg) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
}