import scala.io.StdIn

object Main extends App {
  val s = StdIn.readLine.split(" ")

  val res = s
    .filter(l => l.charAt(0) == 'A' && l.count(_.isUpper) == 2)
    .map(_.toCharArray)
    .map(l => l.slice(2,l.length-1))
    .exists(l => l.count(ch => ch == 'C') == 1)

  println(if (res) "AC" else "WA")
}