function main(input) {
  const s = input.trim()

  if (s.match(/^A[a-z]+C[a-z]+$/)) {
    console.log('AC')
  } else {
    console.log('WA')
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))