#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define file() freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
#define tt int t; cin>>t; while(t--)
#define nl cout<<"\n";
#define sp cout<<" ";
#define rep(i, a, b) for(long long i=a; i<b; i++)

const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
double PI = 4*atan(1);

int main()
{
    optimize();

    string s;

    cin>> s;

    if(s[0] != 'A' )
    {
        cout<< "WA\n";
        return 0;
    }

    int cn= 0;

    for(int i=1; i<s.size(); i++)
    {
        if (i>=2 && i<= (s.size() -2 ))
        {
            if(s[i]== 'C')
            {
                cn++;
                continue;
            }
        }

        if(s[i]< 'a' || s[i] > 'z'  || cn>1)
        {
            {
                cout<< "WA\n";
                return 0;
            }
        }
    }


    cout<< (cn==1?  "AC\n" : "WA\n");

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
	string S;
	cin >> S;

	string ans = "AC";
	if( S[0] != 'A' ) ans = "WA";
	else {
		string s = S.substr( 2, S.size() - 2 - 1 );
		int n = s.find( 'C' );
		if( n == string::npos ) ans = "WA";
		else if( s.find( 'C', n + 1 ) != string::npos ) ans = "WA";
		else {
			for( int i = 0; i < S.size(); i++ ) {
				if( i == 0 || S[i] == 'C' && 2 <= i && i <= S.size() - 2 ) continue;
				if( islower( S[i] ) == false ) ans = "WA";

			}
		}
	}

	cout << ans << endl;
}
