object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val x :: y :: chars = sc.next().toList
  val z = chars.last
  val validates = Seq(
    x == 'A',
    chars.length == chars.count(_ != 'C') + 1,
    (y :: z :: chars.filter(_ != 'C')).forall(_.isLower)
  )
  println(if (validates.forall(identity)) "AC" else "WA")
}
