import std.stdio;

void main() {
    string ans = "WA";
    string s;
    readf(" %s", &s);

    if (s[0] == 'A') {
        ulong c = 0;
        foreach(i, e; s[0..$ - 1]) {
            if (e == 'C') {
                if (c == 0) {
                    c = i;
                } else {
                    c = -1;
                    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);
}
