import std.stdio;
import std.string;
 
void main() {
    string ans = "WA";
    string s = readln.strip;

    if (s[0] == 'A') {
        ulong c = 0;
        foreach(i, e; s[0..$ - 1]) {
            if (e == 'C' && i > 1) {
                c = i;
                break;
            }
        }
        if (c > 1) {
            ans = "AC";
            foreach(i, e; s) {
                if (i == 0 || i == c)
                    continue;
                if (e < 97 || e > 122) {
                    ans = "WA";
                    break;
                }
            }
        }
    }
    writeln(ans);
}