#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vvi vector<vector<int>>
#define all(a) (a).begin(), (a).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
const int MOD = 1e9+7;
const ll LINF = 1e18;
const int INF = 1e9;
ll A, B, C, D, E, F, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S, T;

int main()
{
    cin >> S;
    smatch ssmm;
    if(regex_search(S,ssmm,regex("^A[a-z]+C[a-z]+$")))
    {
        cout << "AC";
        return 0;
    }
    cout << "WA";

    return 0;
}
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
    string s;
    cin >> s;
    int l = s.length();
    if(s[0]!='A'){
        cout << "WA\n";
        return 0;
    }
    int i, cnt = 0;
    for(i=1; i<l; i++){
        if(isupper(s[i])){
            if(i==1 || i==l-1 || s[i]!='C'){
                cout << "WA\n";
                return 0;
            }
            cnt++;
        }
    }
    if(cnt==1) cout << "AC\n";
    else cout << "WA\n";
    return 0;
}