fun main(args: Array<String>) {

    var (S) = readStrings()

    if (S[0] == 'A' && countC(S, 2 .. S.length - 2) == 1 && countNotLowerCase(S) == 0)
        println("AC")
    else
        println("WA")
}

private fun countC(str: String, range: IntRange) = str.substring(range).count { it == 'C' }

private fun countNotLowerCase(str: String) =
    str.replaceFirst('A', 'a').replaceFirst('C', 'c').count { c -> !c.isLowerCase() }

fun readInts(): List<Int> = readStrings().map { it.toInt() }
fun readStrings(): List<String> = readLine()!!.split(" ")