import java.util.Scanner;

//B - AcCepted
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        if (check(S))
            System.out.println("AC");
        else
            System.out.println("WA");
        sc.close();
    }

    static boolean check(String s) {
        if (s.charAt(0) != 'A') return false;
        int cnt = 0;
        for (int i = 1; i < s.length(); i++)
            if (i >= 2 && i <= s.length() - 2) {
                if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false;
            } else if (!Character.isLowerCase(s.charAt(i)))
                return false;
        return cnt == 1;
    }
} 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.nextLine();
        if (check(S))
            System.out.println("AC");
        else
            System.out.println("WA");
        sc.close();
    }

    static boolean check(String s) {
        if (s.charAt(0) != 'A') return false;
        int cnt = 0;
        for (int i = 1; i < s.length(); i++)
            if (i >= 2 && i <= s.length() - 2) {
                if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false;
            } else if (!Character.isLowerCase(s.charAt(i)))
                return false;
        return cnt == 1;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        if (check(S))
            System.out.println("AC");
        else
            System.out.println("WA");
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        if (check(S))
            System.out.println("AC");
        else
            System.out.println("WA");
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc if (check(S))
            System.out.println("AC");
        else
            System.out.println("WA"); check(S) check S System.out.println("AC") System.out.println System.out System System.out "AC" System.out.println("WA") System.out.println System.out System System.out "WA" sc.close() sc.close sc String[] args args static boolean check(String s) {
        if (s.charAt(0) != 'A') return false;
        int cnt = 0;
        for (int i = 1; i < s.length(); i++)
            if (i >= 2 && i <= s.length() - 2) {
                if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false;
            } else if (!Character.isLowerCase(s.charAt(i)))
                return false;
        return cnt == 1;
    } check {
        if (s.charAt(0) != 'A') return false;
        int cnt = 0;
        for (int i = 1; i < s.length(); i++)
            if (i >= 2 && i <= s.length() - 2) {
                if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false;
            } else if (!Character.isLowerCase(s.charAt(i)))
                return false;
        return cnt == 1;
    } if (s.charAt(0) != 'A') return false; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' return false; false int cnt = 0; cnt 0 for (int i = 1; i < s.length(); i++)
            if (i >= 2 && i <= s.length() - 2) {
                if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false;
            } else if (!Character.isLowerCase(s.charAt(i)))
                return false; int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i if (i >= 2 && i <= s.length() - 2) {
                if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false;
            } else if (!Character.isLowerCase(s.charAt(i)))
                return false; if (i >= 2 && i <= s.length() - 2) {
                if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false;
            } else if (!Character.isLowerCase(s.charAt(i)))
                return false; i >= 2 && i <= s.length() - 2 i >= 2 i 2 i <= s.length() - 2 i s.length() - 2 s.length() s.length s 2 {
                if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false;
            } if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false; s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                    if (++cnt > 1) return false;
                } if (++cnt > 1) return false; ++cnt > 1 ++cnt cnt 1 return false; false if (!Character.isLowerCase(s.charAt(i)))
                    return false; !Character.isLowerCase(s.charAt(i)) Character.isLowerCase(s.charAt(i)) Character.isLowerCase Character s.charAt(i) s.charAt s i return false; false if (!Character.isLowerCase(s.charAt(i)))
                return false; !Character.isLowerCase(s.charAt(i)) Character.isLowerCase(s.charAt(i)) Character.isLowerCase Character s.charAt(i) s.charAt s i return false; false return cnt == 1; cnt == 1 cnt 1 String s s public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        if (check(S))
            System.out.println("AC");
        else
            System.out.println("WA");
        sc.close();
    }

    static boolean check(String s) {
        if (s.charAt(0) != 'A') return false;
        int cnt = 0;
        for (int i = 1; i < s.length(); i++)
            if (i >= 2 && i <= s.length() - 2) {
                if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false;
            } else if (!Character.isLowerCase(s.charAt(i)))
                return false;
        return cnt == 1;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        if (check(S))
            System.out.println("AC");
        else
            System.out.println("WA");
        sc.close();
    }

    static boolean check(String s) {
        if (s.charAt(0) != 'A') return false;
        int cnt = 0;
        for (int i = 1; i < s.length(); i++)
            if (i >= 2 && i <= s.length() - 2) {
                if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false;
            } else if (!Character.isLowerCase(s.charAt(i)))
                return false;
        return cnt == 1;
    }
} Main
import java.util.Scanner;

//B - AcCepted
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        if (check(S))
            System.out.println("AC");
        else
            System.out.println("WA");
        sc.close();
    }

    static boolean check(String s) {
        if (s.charAt(0) != 'A') return false;
        int cnt = 0;
        for (int i = 1; i < s.length(); i++)
            if (i >= 2 && i <= s.length() - 2) {
                if (s.charAt(i) == 'C') {
                    if (++cnt > 1) return false;
                }else if (!Character.isLowerCase(s.charAt(i)))
                    return false;
            } else if (!Character.isLowerCase(s.charAt(i)))
                return false;
        return cnt == 1;
    }
}
