'use strict'

function main(input) {

  const isUpper = (char) => {
    return /[A-Z]/g.test(char);
  }

  const str = input.split('\n')[0];
  let ans = 'AC';

  const s1 = str.charAt(0);
  if (s1 !== 'A') ans = 'WA';

  const s2 = str.charAt(1);
  if (isUpper(s2)) ans = 'WA';

  const s3 = str.slice(2, str.length - 1).split('');
  let upper = 0;
  let hasC  = 0;
  for (const c of s3) {
    if (c === 'C') hasC += 1;
    if (isUpper(c)) upper += 1;
  }
  if (upper !== 1 || hasC !== 1) ans = 'WA'

  const s4 = str.charAt(str.length - 1);
  if (isUpper(s4)) ans = 'WA';

  console.log(ans);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
