import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        if(s[0] == 'A') {
            int count = 0;
            for (int i = 2; i < s.length - 1; i++) {
                if(s[i] == 'C') {
                    count++;
                }
            }
            if(count == 1) {
                count = 0;
                for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                }
                if(count == 2) {
                    System.out.println("AC");
                    return;
                }
            }
        }
        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);
        char[] s = sc.next().toCharArray();
        if(s[0] == 'A') {
            int count = 0;
            for (int i = 2; i < s.length - 1; i++) {
                if(s[i] == 'C') {
                    count++;
                }
            }
            if(count == 1) {
                count = 0;
                for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                }
                if(count == 2) {
                    System.out.println("AC");
                    return;
                }
            }
        }
        System.out.println("WA");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        if(s[0] == 'A') {
            int count = 0;
            for (int i = 2; i < s.length - 1; i++) {
                if(s[i] == 'C') {
                    count++;
                }
            }
            if(count == 1) {
                count = 0;
                for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                }
                if(count == 2) {
                    System.out.println("AC");
                    return;
                }
            }
        }
        System.out.println("WA");
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        if(s[0] == 'A') {
            int count = 0;
            for (int i = 2; i < s.length - 1; i++) {
                if(s[i] == 'C') {
                    count++;
                }
            }
            if(count == 1) {
                count = 0;
                for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                }
                if(count == 2) {
                    System.out.println("AC");
                    return;
                }
            }
        }
        System.out.println("WA");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc if(s[0] == 'A') {
            int count = 0;
            for (int i = 2; i < s.length - 1; i++) {
                if(s[i] == 'C') {
                    count++;
                }
            }
            if(count == 1) {
                count = 0;
                for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                }
                if(count == 2) {
                    System.out.println("AC");
                    return;
                }
            }
        } s[0] == 'A' s[0] s 0 'A' {
            int count = 0;
            for (int i = 2; i < s.length - 1; i++) {
                if(s[i] == 'C') {
                    count++;
                }
            }
            if(count == 1) {
                count = 0;
                for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                }
                if(count == 2) {
                    System.out.println("AC");
                    return;
                }
            }
        } int count = 0; count 0 for (int i = 2; i < s.length - 1; i++) {
                if(s[i] == 'C') {
                    count++;
                }
            } int i = 2; int i = 2; i 2 i < s.length - 1 i s.length - 1 s.length s s.length 1 i++ i++ i {
                if(s[i] == 'C') {
                    count++;
                }
            } {
                if(s[i] == 'C') {
                    count++;
                }
            } if(s[i] == 'C') {
                    count++;
                } s[i] == 'C' s[i] s i 'C' {
                    count++;
                } count++ count if(count == 1) {
                count = 0;
                for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                }
                if(count == 2) {
                    System.out.println("AC");
                    return;
                }
            } count == 1 count 1 {
                count = 0;
                for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                }
                if(count == 2) {
                    System.out.println("AC");
                    return;
                }
            } count = 0 count 0 for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                } int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                } {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                } if(Character.isUpperCase(s[i])) {
                        count++;
                    } Character.isUpperCase(s[i]) Character.isUpperCase Character s[i] s i {
                        count++;
                    } count++ count if(count == 2) {
                    System.out.println("AC");
                    return;
                } count == 2 count 2 {
                    System.out.println("AC");
                    return;
                } System.out.println("AC") System.out.println System.out System System.out "AC" return; 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);
        char[] s = sc.next().toCharArray();
        if(s[0] == 'A') {
            int count = 0;
            for (int i = 2; i < s.length - 1; i++) {
                if(s[i] == 'C') {
                    count++;
                }
            }
            if(count == 1) {
                count = 0;
                for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                }
                if(count == 2) {
                    System.out.println("AC");
                    return;
                }
            }
        }
        System.out.println("WA");
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        if(s[0] == 'A') {
            int count = 0;
            for (int i = 2; i < s.length - 1; i++) {
                if(s[i] == 'C') {
                    count++;
                }
            }
            if(count == 1) {
                count = 0;
                for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                }
                if(count == 2) {
                    System.out.println("AC");
                    return;
                }
            }
        }
        System.out.println("WA");
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        if(s[0] == 'A') {
            int count = 0;
            for (int i = 2; i < s.length - 1; i++) {
                if(s[i] == 'C') {
                    count++;
                }
            }
            if(count == 1) {
                count = 0;
                for (int i = 0; i < s.length; i++) {
                    if(Character.isUpperCase(s[i])) {
                        count++;
                    }
                }
                if(count == 2) {
                    System.out.println("AC");
                    return;
                }
            }
        }
        System.out.println("WA");
    }
}