function main(arg) {
    // 処理

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