import scala.io.StdIn

object Main extends App {
  val s = StdIn.readLine

  val res = if (s.charAt(0) == 'A' && s.count(_.isUpper) == 2) {
    s.substring(2,s.length-1)
     .count(_ == 'C')
     .==(1)
  } else false

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