'use strict';

const CORRECT_ANSWER = 'AC';
const WRONG_ANSWER = 'WA';

const FIRST_CHARACTER_REQUIREMENT = 'A';

const SINGLE_OCCURRENCE_START_INDEX = 2;

const isFirstCharacterValid = input => input.charAt(0) === FIRST_CHARACTER_REQUIREMENT;
const isSingleOccurenceCharacterValid = input => {
    const cMatch = input.substring(SINGLE_OCCURRENCE_START_INDEX, input.length-1).match(/C/g);

    return cMatch !== null && cMatch.length === 1;
};
const areRemainingCharactersLowercase = input => {
    const clearedAC = input.replace(/[AC]/g, "");

    return clearedAC.toLowerCase() === clearedAC;
}

const process = input => isFirstCharacterValid(input) && isSingleOccurenceCharacterValid(input) && areRemainingCharactersLowercase(input) ? CORRECT_ANSWER: WRONG_ANSWER;

console.log(process(require("fs").readFileSync("/dev/stdin", "utf8").trim()));