fun main(args: Array<String>) {
    val s = readLine()!!
    println(if (s.startsWith("A") && s.substring(2, s.length - 1).count { it == 'C' } == 1 && s.count { it.isLowerCase() } == s.length - 2) {
        "AC"
    } else {
        "WA"
    })
}