#define _GLIBCXX_DEBUG//実行時、何も出なかったらこれを使う
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<queue>
#include<stack>
#include<map>
#include<numeric>
#include<climits>
#include<limits>//
#include <stdio.h>//
#include<cmath>
#include<iomanip>

using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

typedef long long ll;

template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }
template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }

int dy[] = {1,0,-1,0}; //次に行くところ
int dx[] = {0,1,0,-1}; //s上に同じ

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int n,cnt = 0;
  string s;
  cin >> s;
  n = s.size();

  if (s[0] != 'A' || (s[1] < 'a' || s[1] > 'z') || (s[n-1] < 'a' || s[n-1] > 'z')){
    cout << "WA\n";
    return 0;
  }
  

  for (int i = 2; i <= n-2; i++){
    if (s[i] == 'C'){
      cnt++;
    }
    if (cnt >= 2){
      cout << "WA\n";
      return 0;
    }
    if (s[i] != 'C' &&(s[i] < 'a' || s[i] > 'z')){
      cout << "WA\n";
      return 0;
    }
  }
  
  if (cnt == 1){
    cout << "AC\n";
  }else{
    cout << "WA\n";
  }
  
  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
  return 0;
}

Measured memory_bytes: 3592