fun main(args: Array<String>) = println(run {
    val s = readLine()!!

    val a = s[0] == 'A'
    val b = s.substring(2..s.lastIndex-1).count { it == 'C' } == 1
    val c = s.drop(1).filter { it != 'C' }.all { it in 'a'..'z' }
    if(a && b && c) "AC" else "WA"

})
