#include <cstdio>
#include <regex>

int LEN = 10;

int main() {
    char s[LEN + 1];
    scanf("%s", s);
    std::regex re("A[a-z]+C[a-z]+");
    if (regex_match(s, re)) {
        printf("AC\n");
    } else {
        printf("WA\n");
    }
    return 0;
}
