fun check(s: String): Boolean {
    if (s[0] != 'A') return false
    if (s.slice(2..s.length-2).count {it == 'C'} != 1) {
        return false
    }
    return s.count { it.isLowerCase() } == s.length - 2
}

fun main(args: Array<String>) {
    val s = readLine()!!;
    println(if (check(s)) "AC" else "WA")
}