object Main extends App {

val s_list = scala.io.StdIn.readLine.toList

def check(s_list:List[Char]):Boolean = {
  if (s_list(0) != 'A') return false
  val upper_c_idx = s_list.indexOfSlice("C")
  if (upper_c_idx != s_list.lastIndexOfSlice("C")) return false
  if ((upper_c_idx < 2) | (s_list.length-2 < upper_c_idx)) return false
  var cnt:Int = s_list.filter(c => c >= 'A' && c <= 'Z').size
  if (cnt > 2) return false
  return true
}

if (check(s_list)) println("AC") else println("WA")
}