fun main(args: Array<String>) {
  val S = readLine()!!.toString()
  var ans = "AC"
  if(S.take(1) != "A") {
    ans = "WA"
  }    
  if(S.drop(S.length -1) == "C") {
    ans = "WA"
  }    

  val bool = (2..S.length - 2).any{it ->
    S[it] == 'C'
  }
  if(bool == false){
    ans = "WA"
  }

  val boolUpperCase = S.count{it ->
    it.toInt() < 97
  }
  if(boolUpperCase > 2) {
    ans = "WA"
  }

  println(ans)
}