'use strict'

function main(input) {
  // AC - WA

  input = input.split('\n')[0].split('')

  let ans = 'WA'
  if (input[0] == 'A') {
    // ans = 'WA'
    let tar = input.slice(2, input.length - 1)
    let C = tar.indexOf('C')

    if (C >= 0) {
      let tar2 = []
      tar2.push(input[1]) //.slice(1, 2))
      tar2 = tar2.concat(tar.filter((x, i, self) => i !== C))
      tar2.push(input[input.length - 1])
      tar2 = tar2.join('')

      if (tar2.match(/^[a-z]+$/)) {
        ans = 'AC'
      }
    }
  }

  console.log(ans)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))