fun main(args : Array<String>) {
    val S = readLine()!!

    val condition1 = S.first() == 'A'
    val condition2 = S.subSequence(2, S.length - 1).filter { it == 'C' }.length == 1
    val condition3 = S.filter { it != 'A' && it != 'C' }.filter { it.isUpperCase() }.length == 0

    if (condition1 && condition2 && condition3) {
        println("AC")
    } else {
        println("WA")
    }
}