import java.util.*;

public class Main {

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

        boolean res = true;
        int indexC = 0;

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

        boolean hasC = false;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                hasC = true;
                indexC = i;
                break;
            }
        }

        res = hasC ? true : false;
        if (!res) {
            System.out.println("WA");
            return;
        }

        for (int i = 0; i < s.length(); i++) {
            if (i == 0 || i == indexC) continue;

            if (!Character.isLowerCase(s.charAt(i))) {
                res = false;
                break;
            }
        }

        System.out.println(res ? "AC" : "WA");
    }
} import java.util.*; util.* java public class Main {

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

        boolean res = true;
        int indexC = 0;

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

        boolean hasC = false;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                hasC = true;
                indexC = i;
                break;
            }
        }

        res = hasC ? true : false;
        if (!res) {
            System.out.println("WA");
            return;
        }

        for (int i = 0; i < s.length(); i++) {
            if (i == 0 || i == indexC) continue;

            if (!Character.isLowerCase(s.charAt(i))) {
                res = false;
                break;
            }
        }

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

        boolean res = true;
        int indexC = 0;

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

        boolean hasC = false;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                hasC = true;
                indexC = i;
                break;
            }
        }

        res = hasC ? true : false;
        if (!res) {
            System.out.println("WA");
            return;
        }

        for (int i = 0; i < s.length(); i++) {
            if (i == 0 || i == indexC) continue;

            if (!Character.isLowerCase(s.charAt(i))) {
                res = false;
                break;
            }
        }

        System.out.println(res ? "AC" : "WA");
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        boolean res = true;
        int indexC = 0;

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

        boolean hasC = false;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                hasC = true;
                indexC = i;
                break;
            }
        }

        res = hasC ? true : false;
        if (!res) {
            System.out.println("WA");
            return;
        }

        for (int i = 0; i < s.length(); i++) {
            if (i == 0 || i == indexC) continue;

            if (!Character.isLowerCase(s.charAt(i))) {
                res = false;
                break;
            }
        }

        System.out.println(res ? "AC" : "WA");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc boolean res = true; res true int indexC = 0; indexC 0 if (s.charAt(0) != 'A') {
            res = false;
            System.out.println("WA");
            return;
        } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
            res = false;
            System.out.println("WA");
            return;
        } res = false res false System.out.println("WA") System.out.println System.out System System.out "WA" return; boolean hasC = false; hasC false for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                hasC = true;
                indexC = i;
                break;
            }
        } int i = 2; int i = 2; i 2 i <= s.length() - 2 i s.length() - 2 s.length() s.length s 2 i++ i++ i {
            if (s.charAt(i) == 'C') {
                hasC = true;
                indexC = i;
                break;
            }
        } {
            if (s.charAt(i) == 'C') {
                hasC = true;
                indexC = i;
                break;
            }
        } if (s.charAt(i) == 'C') {
                hasC = true;
                indexC = i;
                break;
            } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                hasC = true;
                indexC = i;
                break;
            } hasC = true hasC true indexC = i indexC i break; res = hasC ? true : false res hasC ? true : false hasC true false if (!res) {
            System.out.println("WA");
            return;
        } !res res {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i = 0; i < s.length(); i++) {
            if (i == 0 || i == indexC) continue;

            if (!Character.isLowerCase(s.charAt(i))) {
                res = false;
                break;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if (i == 0 || i == indexC) continue;

            if (!Character.isLowerCase(s.charAt(i))) {
                res = false;
                break;
            }
        } {
            if (i == 0 || i == indexC) continue;

            if (!Character.isLowerCase(s.charAt(i))) {
                res = false;
                break;
            }
        } if (i == 0 || i == indexC) continue; i == 0 || i == indexC i == 0 i 0 i == indexC i indexC continue; if (!Character.isLowerCase(s.charAt(i))) {
                res = false;
                break;
            } !Character.isLowerCase(s.charAt(i)) Character.isLowerCase(s.charAt(i)) Character.isLowerCase Character s.charAt(i) s.charAt s i {
                res = false;
                break;
            } res = false res false break; System.out.println(res ? "AC" : "WA") System.out.println System.out System System.out res ? "AC" : "WA" res "AC" "WA" String[] args args public class Main {

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

        boolean res = true;
        int indexC = 0;

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

        boolean hasC = false;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                hasC = true;
                indexC = i;
                break;
            }
        }

        res = hasC ? true : false;
        if (!res) {
            System.out.println("WA");
            return;
        }

        for (int i = 0; i < s.length(); i++) {
            if (i == 0 || i == indexC) continue;

            if (!Character.isLowerCase(s.charAt(i))) {
                res = false;
                break;
            }
        }

        System.out.println(res ? "AC" : "WA");
    }
} public class Main {

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

        boolean res = true;
        int indexC = 0;

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

        boolean hasC = false;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                hasC = true;
                indexC = i;
                break;
            }
        }

        res = hasC ? true : false;
        if (!res) {
            System.out.println("WA");
            return;
        }

        for (int i = 0; i < s.length(); i++) {
            if (i == 0 || i == indexC) continue;

            if (!Character.isLowerCase(s.charAt(i))) {
                res = false;
                break;
            }
        }

        System.out.println(res ? "AC" : "WA");
    }
} Main
import java.util.*;

public class Main {

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

        boolean res = true;
        int indexC = 0;

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

        boolean hasC = false;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                hasC = true;
                indexC = i;
                break;
            }
        }

        res = hasC ? true : false;
        if (!res) {
            System.out.println("WA");
            return;
        }

        for (int i = 0; i < s.length(); i++) {
            if (i == 0 || i == indexC) continue;

            if (!Character.isLowerCase(s.charAt(i))) {
                res = false;
                break;
            }
        }

        System.out.println(res ? "AC" : "WA");
    }
}
