function Main () {
  var i = 'AcycliC'
  if (
    i.charAt(0) !== 'A' ||
    i.slice(2, i.length - 2).indexOf('C') === -1 ||
    i.match(/C/g).length !== 1 ||
    !/^[a-z]+$/.test(i.replace('A', '').replace('C', '').replace(/\s/, ''))
  ) {
    console.log('%s','WA');
  } else {
    console.log('%s', 'AC');
  }

}

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