import java.util.*;
//https://atcoder.jp/contests/abc104/tasks/abc104_b
import java.util.regex.Pattern;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        sc.close();
        final String R = "^A[a-z][a-z]*C[a-z]*[a-z]$";
        Pattern p = Pattern.compile(R);

        if (p.matcher(S).find())
            System.out.println("AC");
        else
            System.out.println("WA");
    }
} import java.util.*; util.* java import java.util.regex.Pattern; Pattern java.util.regex class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        sc.close();
        final String R = "^A[a-z][a-z]*C[a-z]*[a-z]$";
        Pattern p = Pattern.compile(R);

        if (p.matcher(S).find())
            System.out.println("AC");
        else
            System.out.println("WA");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        sc.close();
        final String R = "^A[a-z][a-z]*C[a-z]*[a-z]$";
        Pattern p = Pattern.compile(R);

        if (p.matcher(S).find())
            System.out.println("AC");
        else
            System.out.println("WA");
    } main {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        sc.close();
        final String R = "^A[a-z][a-z]*C[a-z]*[a-z]$";
        Pattern p = Pattern.compile(R);

        if (p.matcher(S).find())
            System.out.println("AC");
        else
            System.out.println("WA");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc final String R = "^A[a-z][a-z]*C[a-z]*[a-z]$"; R "^A[a-z][a-z]*C[a-z]*[a-z]$" Pattern p = Pattern.compile(R); p Pattern.compile(R) Pattern.compile Pattern R if (p.matcher(S).find())
            System.out.println("AC");
        else
            System.out.println("WA"); p.matcher(S).find() p.matcher(S).find p.matcher(S) p.matcher p 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" String[] args args
import java.util.*;
//https://atcoder.jp/contests/abc104/tasks/abc104_b
import java.util.regex.Pattern;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        sc.close();
        final String R = "^A[a-z][a-z]*C[a-z]*[a-z]$";
        Pattern p = Pattern.compile(R);

        if (p.matcher(S).find())
            System.out.println("AC");
        else
            System.out.println("WA");
    }
}