object Main {
  def main(args:Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    val s = sc.next
    println(
      if(s(0) == 'A' && s.slice(2, s.length - 1).count(_ == 'C') == 1 && s.slice(1, s.length - 1).forall(c => c.isLower || c == 'C')) "AC"
      else "WA"
    )
  }
}