#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;

void b_accepted(void) {
	string s;
	cin >> s;
	bool judge_a = false, judge_b = false, judge_c = false;

	int cnt_c = 0;
	for (int i = 0; i < s.size(); i++) {
		if (i == 0) {
			if (s[i] == 'A') judge_a = true;
			else             break;
		}
		else if (s[i] == 'C'){
			if (i >= 2 && i < s.size() - 1) {
				cnt_c++;
			}
		}
		else {
			if (s[i] < 'a') {
				judge_c = false;
				break;
			}
			else judge_c = true;
		}
	}

	if (cnt_c == 1) judge_b = true;

	if (judge_a & judge_b & judge_c) {
		cout << "AC" << endl;
	}
	else {
		cout << "WA" << endl;
	}
}

int main()
{
	b_accepted();
    return 0;
}
#include<bits/stdc++.h>
using namespace std;



int main()
{
  string S;cin>>S;
  if(S[0]!='A'||S.size()<3){printf("WA");return 0;}
  int countc=0;
  for(int i=2;i<S.size()-1;i++)if(S[i]=='C')countc++;
  if(countc!=1){printf("WA");return 0;}
  for(int i=1;i<S.size();i++)if(S[i]!='A'&&S[i]!='C'&&S[i]-'A'>=0&&S[i]-'A'<=26){printf("WA");return 0;}
  printf("AC");
}