

fun main(args: Array<String>): Unit {

    val s = readLine()!!.trim()
    var b = s[0] == 'A'
    b = b && s.drop(2).dropLast(1).count{it == 'C'} == 1
    b = b && s.count{it.isUpperCase()} == 2
    println(
            if (b) "AC"
    else "WA"
    )
}