#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"s=input()\n"
"d='BDEFGHIJKLMNOPQRSTUVWXYZ'\n"
"if s[0]=='A' and s.count('A')==1 and s.count('C')==1 and s[2:-1].count('C')==1:\n"
"    for t in d:\n"
"        if t in s:\n"
"            break\n"
"    else:\n"
"        print('AC')\n"
"        exit()\n"
"print('WA')\n"
"\"";
  system(s);
  return 0;
}            