
'use strict'

function main(input) {
    input = input.split('')

    let ans = "AC"


    //found A
    if (input[0] != "A") {
        ans = "WA"
    }

    let isUpper = (str) => {
        return str.match(/^[A-Z]+$/) ? true : false
    }
    let isLower = (str) => {
        return str.match(/^[a-z]+$/) ? true : false
    }
    let cnt = 0;

    for (let i = 1; i < input.length; i++) {
        if (isUpper(input[i])) {
            if (i == 1 ||
                i == input.length - 1 ||
                input[i] != 'C') {
                ans = "WA";
            }
            ++cnt;
        }
    }
    if (cnt != 1) {
        ans = "WA";
    }

    console.log(ans)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))