function main(arg) {
    // 処理

    if (arg[0] === 'A') {
        arg[0] = 'a'
        var tmp  = arg.slice(2, -2)
        if (tmp.split("C").length === 2) {
            var text = arg[0] + arg[1] + tmp.spllit("C").join("c") + arg[arg.length-2] + arg[arg.length-1]
            if (!text.match(/^[A-Z]+$/)){
                console.log('AC')
                return
            }
        }
    }
    console.log('WA')
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));