const main = function(input){
  var str = input;
  var len = str.length;
  var ac = false;
  var CAppeared = false;
  
  if(str[0]!=="A"){
  	console.log("WA");
    return;
  }  
  for(var i=1;i<len;i++){
    if(isUpper(str[i])){
    	if(CAppeared)break;
        else if(i!==len-1 && i>1 && str[i]==="C") CAppeared = true;
    }
    if(i===len-1 && CAppeared) ac=true;
  }
  if(ac) console.log("AC");
  else console.log("WA");
}

const isUpper = function (str){
  return str===str.toUpperCase();
}
 
 
main(require("fs").readFileSync("/dev/stdin","utf-8"));