import scala.io.StdIn

object Main extends App {

  val s = StdIn.readLine()
  val sc = s.tail.slice(1, s.length - 2)
  val rep = s.tail.replace("C", "")
  val r = (s.head == 'A' &&
    sc.count(c => c == 'C') == 1 &&
    rep.forall(c => 'a' <= c && c <= 'z'))


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