fun main(args: Array<String>) {
    abc104b()
}

fun abc104b() {
    val s = readLine()!!

    val regex = Regex("^A[a-z]+C[a-z]+")

    val answer = if (regex.matches(s)) "AC" else "WA"

    println(answer)
}
