#include<iostream>
#include<iomanip>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<string>
#include<utility>
#include<numeric>
#include<algorithm>
#include<cmath>
#include<climits>
using namespace std;

using ll = long long;

class Stream{
public:
    Stream(){

    }
    //配列以外の入力を受け取る
    void read(){

    }
    template<typename First, typename... Rest>
    void read(First& first, Rest&... rest){
        cin >> first;
        read(rest...);
    }
    //配列を区切って出力する
    template<typename T>
    void write_vec(vector<T>& v, char divider){
        for(size_t i = 0; i < v.size(); i++){
            cout << v[i] << divider;
        }
    }
}; 

int main(){
    Stream io;
    
    string S;
    io.read(S);
    string ans = "AC";
    if(S[0] != 'A') ans = "WA";
    int c = 0;
    for(int i = 1; i < S.size(); i++){
        if(!(S[i] <= 'z' && S[i] >= 'a')){
            if(i <= S.size() - 2 && i >= 2){
                c++;
            }
            else ans = "WA";
        }
    }
    if(c != 1) ans = "WA";
    cout << ans;
    return 0;
}
#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define repa(i, s, n) for(int i = s; i < (int)n; i++)
using namespace std;
using ll = long long;
typedef vector<int> vi;

int main(){
	string s;
	cin >> s;
	bool OK_A = false;
	bool OK_C = false;
	bool OK_lower = true;
	int cnum;

	if(s[0] == 'A') OK_A = true;
	rep(i, s.size()-1){
		if(i != 1){
			if(s[i] == 'C'){
				cnum = i;
				if(OK_C == false) OK_C = true;
				else OK_C = false;
			}
		}
	}

	rep(i, s.size()){
		if(i != 0 && i != cnum){
			if(isupper(s[i])) OK_lower = false;
		}
	}

	if(OK_A && OK_C && OK_lower) cout << "AC" << endl;
	else cout << "WA" << endl;
    return 0;
}