import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;
import std.ascii;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

bool calc(string s) {
    if (s[0] != 'A') return false;
    if (s[2..$-1].count!(c => c == 'C') != 1) return false;
    if (s.count!(c => isUpper(c)) > 2) return false;
    return true;
}

void main() {
    auto s = readln.chomp;
    writeln(calc(s) ? "AC" : "WA");
}
