function main(input) {
  const ratz = /[a-z]/
  const S = input.split('');
  let ans = 'WA';
  let cCnt = 0;
  let lowCnt = 0;
  
  for (let i = 0; i < S.length; i++) {
    if (ratz.test(S[i])) {
      lowCnt++;
    }
    
    if (2 <= i && i < S.length - 1) {
      if(S[i] === 'C') { cCnt++; }
    }
  }
       
  if (S[0] === 'A' 
      && cCnt === 1
      && lowCnt === (S.length - 2)
  ) {
    ans = 'AC'; 
  }
  
  console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));