inp = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')
S = inp.shift()
b = 1
b = b && S[0] == 'A'
cnt = 0
for (i=2; i<S.length-1; i++) {
    if (S[i] == 'C') {
        cnt++
    }
}
b = b && cnt == 1
console.log(b ? 'AC' : 'WA')