#include <bits/stdc++.h>
using namespace std;
#define int long long int
int32_t main(){
	char s[15];cin>>s;
	if(s[0]!='A'){
		cout<<"WA";return 0;
	}
	if(count(s+2,s+strlen(s)-1,'C')!=1){
		cout<<"WA";return 0;
	}
	if(count_if(s+1,s+strlen(s),[](char c){return c>='A'&&c<='Z';})>1){
		cout<<"WA";return 0;
	}
	cout<<"AC";
}
