import scala.io.{StdIn => in}

object Main extends App {
  val s = in.readLine

  val t1 = s.head
  val t2 = s.drop(2).init
  val ans = if(t1 == 'A' && t2.count(_ == 'C') == 1) "AC"
    else "WA"
  println(ans)
}