// parameter "input" gets all data
function Main(input) {
  var result = 'AC';

  if (input.charAt(0) != 'A') {
   console.log('WA');
   return;
  }

  var cFound = false;
  for (var i = 1; i < input.length; i++) {
    if (input.charAt(i) === input.charAt(i).toUpperCase()) {
      if (i === 1 || i === input.length - 1 || input.charAt(i) != 'C') {
        console.log('WA');
        return;
      } else {
        cFound = true;
      }
    }
  }

  if (cFound === false) {
    result = 'WA';
  }

  console.log(result);
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
