function main(input) {
  var S = input[0].split("");
  var ans = true;
  if(S[0] != "A") ans = false;
  else if(S.filter((v,i)=>i>=2&&i<=S.length-2&&v=="C").length!=1) ans = false;
  else if(S.filter((v,i)=>i>0&&v==v.toUpperCase()).length!=1) ans = false;
  console.log(ans?"AC":"WA");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
