import java.util.*;

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

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

        boolean cFound = false;
        for (int i = 1; i < s.length(); i++) {
            if (!cFound && 2 <= i && i <= s.length() - 2 && s.charAt(i) == 'C') {
                cFound = true;
            } else if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
                System.out.println("WA");
                return;
            }
        }

        if (cFound) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();

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

        boolean cFound = false;
        for (int i = 1; i < s.length(); i++) {
            if (!cFound && 2 <= i && i <= s.length() - 2 && s.charAt(i) == 'C') {
                cFound = true;
            } else if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
                System.out.println("WA");
                return;
            }
        }

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

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

        boolean cFound = false;
        for (int i = 1; i < s.length(); i++) {
            if (!cFound && 2 <= i && i <= s.length() - 2 && s.charAt(i) == 'C') {
                cFound = true;
            } else if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
                System.out.println("WA");
                return;
            }
        }

        if (cFound) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();

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

        boolean cFound = false;
        for (int i = 1; i < s.length(); i++) {
            if (!cFound && 2 <= i && i <= s.length() - 2 && s.charAt(i) == 'C') {
                cFound = true;
            } else if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
                System.out.println("WA");
                return;
            }
        }

        if (cFound) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.nextLine(); s scanner.nextLine() scanner.nextLine scanner if (s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; boolean cFound = false; cFound false for (int i = 1; i < s.length(); i++) {
            if (!cFound && 2 <= i && i <= s.length() - 2 && s.charAt(i) == 'C') {
                cFound = true;
            } else if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
                System.out.println("WA");
                return;
            }
        } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
            if (!cFound && 2 <= i && i <= s.length() - 2 && s.charAt(i) == 'C') {
                cFound = true;
            } else if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
                System.out.println("WA");
                return;
            }
        } {
            if (!cFound && 2 <= i && i <= s.length() - 2 && s.charAt(i) == 'C') {
                cFound = true;
            } else if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
                System.out.println("WA");
                return;
            }
        } if (!cFound && 2 <= i && i <= s.length() - 2 && s.charAt(i) == 'C') {
                cFound = true;
            } else if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
                System.out.println("WA");
                return;
            } !cFound && 2 <= i && i <= s.length() - 2 && s.charAt(i) == 'C' i <= s.length() - 2 !cFound && 2 <= i && i <= s.length() - 2 && s.charAt(i) == 'C' !cFound cFound 2 <= i 2 i i <= s.length() - 2 i s.length() - 2 s.length() s.length s 2 s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                cFound = true;
            } cFound = true cFound true if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
                System.out.println("WA");
                return;
            } s.charAt(i) < 'a' || 'z' < s.charAt(i) s.charAt(i) < 'a' s.charAt(i) s.charAt s i 'a' 'z' < s.charAt(i) 'z' s.charAt(i) s.charAt s i {
                System.out.println("WA");
                return;
            } System.out.println("WA") System.out.println System.out System System.out "WA" return; if (cFound) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        } cFound {
            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
import java.util.*;

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

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

        boolean cFound = false;
        for (int i = 1; i < s.length(); i++) {
            if (!cFound && 2 <= i && i <= s.length() - 2 && s.charAt(i) == 'C') {
                cFound = true;
            } else if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
                System.out.println("WA");
                return;
            }
        }

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