import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String word = input.readLine();

        boolean state = true;

        state &= word.charAt(0) == 'A';
        boolean foundC = false;

        for (int i = 1; i < word.length(); i++) {
            if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            }
        }

        if (foundC && state)
            System.out.println("AC");
        else
            System.out.println("WA");
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String word = input.readLine();

        boolean state = true;

        state &= word.charAt(0) == 'A';
        boolean foundC = false;

        for (int i = 1; i < word.length(); i++) {
            if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            }
        }

        if (foundC && state)
            System.out.println("AC");
        else
            System.out.println("WA");
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String word = input.readLine();

        boolean state = true;

        state &= word.charAt(0) == 'A';
        boolean foundC = false;

        for (int i = 1; i < word.length(); i++) {
            if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            }
        }

        if (foundC && state)
            System.out.println("AC");
        else
            System.out.println("WA");
    } main {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String word = input.readLine();

        boolean state = true;

        state &= word.charAt(0) == 'A';
        boolean foundC = false;

        for (int i = 1; i < word.length(); i++) {
            if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            }
        }

        if (foundC && state)
            System.out.println("AC");
        else
            System.out.println("WA");
    } BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) String word = input.readLine(); word input.readLine() input.readLine input boolean state = true; state true state &= word.charAt(0) == 'A' state word.charAt(0) == 'A' word.charAt(0) word.charAt word 0 'A' boolean foundC = false; foundC false for (int i = 1; i < word.length(); i++) {
            if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            }
        } int i = 1; int i = 1; i 1 i < word.length() i word.length() word.length word i++ i++ i {
            if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            }
        } {
            if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            }
        } if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            } !foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C' i <= word.length() -2 !foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C' !foundC foundC i >=2 i 2 i <= word.length() -2 i word.length() -2 word.length() word.length word 2 word.charAt(i) == 'C' word.charAt(i) word.charAt word i 'C' {
                foundC = true;
            } foundC = true foundC true if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            } !Character.isLowerCase(word.charAt(i)) Character.isLowerCase(word.charAt(i)) Character.isLowerCase Character word.charAt(i) word.charAt word i {
                state = false;
                break;
            } state = false state false break; if (foundC && state)
            System.out.println("AC");
        else
            System.out.println("WA"); foundC && state foundC state System.out.println("AC") System.out.println System.out System System.out "AC" System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String word = input.readLine();

        boolean state = true;

        state &= word.charAt(0) == 'A';
        boolean foundC = false;

        for (int i = 1; i < word.length(); i++) {
            if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            }
        }

        if (foundC && state)
            System.out.println("AC");
        else
            System.out.println("WA");
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String word = input.readLine();

        boolean state = true;

        state &= word.charAt(0) == 'A';
        boolean foundC = false;

        for (int i = 1; i < word.length(); i++) {
            if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            }
        }

        if (foundC && state)
            System.out.println("AC");
        else
            System.out.println("WA");
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String word = input.readLine();

        boolean state = true;

        state &= word.charAt(0) == 'A';
        boolean foundC = false;

        for (int i = 1; i < word.length(); i++) {
            if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            }
        }

        if (foundC && state)
            System.out.println("AC");
        else
            System.out.println("WA");
    }
}
