function Main(input) {
  input = input.split("\n");
  var s = input[0];
  var ssub = input[0].slice(2,s.length-1);
  var a = ssub.match(/C/g);
  var ssub2 = ssub.match(/[A-Z]/g);
  var ans = "WA";
  if(a!=null&&ssub2!=null){
  if(s.substr(0,1)=="A"&&a.length==1&&ssub2.length==1){
    ans = "AC";
  }
}
  console.log('%s', ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));