#include<bits/stdc++.h>
using namespace std;
string st;int f=0;
int main(){
	cin>>st;f=0;
	if(st[0]!='A'){cout<<"WA"<<endl;return 0;}
	for(int i=2;i<st.length()-1;i++)if(st[i]=='C')f++;
	if(f!=1){cout<<"WA"<<endl;return 0;}
	for(int i=1;i<st.length();i++)if((st[i]<'a'||st[i]>'z')&&(st[i]!='C')){cout<<"WA"<<endl;return 0;}
	cout<<"AC"<<endl;return 0;
}