import java.util.Scanner;

public class Main {

    public static void main(String[] args){

//        String a = "kyoto";
//        String b = "tokyo";
        //Scanner cin = new Scanner(new FileReader("src\\AtcoderContest0805\\task2-test-input.txt"));
        Scanner cin = new Scanner(System.in);
        String a = cin.nextLine();
        if (a.charAt(0)!='A') {
            System.out.println("WA");
            return;
        }

        int count = 0;
        for (int i=0;i<a.length();i++){
                if (a.charAt(i)=='C') count++;
        }
        if (count>1) {
            System.out.println("WA");
            return;
        }
        else if (count==0) {
            System.out.println("WA");
            return;
        }
        else {
            if (a.indexOf("C")==1||a.indexOf("C")==a.length()-1) {
                System.out.println("WA");
                return;
            }
        }

        for (int i=1;i<a.length();i++) {
            if (a.charAt(i)=='C') continue;
            char temp = a.charAt(i);
            if (!(temp>='a'&&temp<='z')) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
        return;
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args){

//        String a = "kyoto";
//        String b = "tokyo";
        //Scanner cin = new Scanner(new FileReader("src\\AtcoderContest0805\\task2-test-input.txt"));
        Scanner cin = new Scanner(System.in);
        String a = cin.nextLine();
        if (a.charAt(0)!='A') {
            System.out.println("WA");
            return;
        }

        int count = 0;
        for (int i=0;i<a.length();i++){
                if (a.charAt(i)=='C') count++;
        }
        if (count>1) {
            System.out.println("WA");
            return;
        }
        else if (count==0) {
            System.out.println("WA");
            return;
        }
        else {
            if (a.indexOf("C")==1||a.indexOf("C")==a.length()-1) {
                System.out.println("WA");
                return;
            }
        }

        for (int i=1;i<a.length();i++) {
            if (a.charAt(i)=='C') continue;
            char temp = a.charAt(i);
            if (!(temp>='a'&&temp<='z')) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
        return;
    }

} Main public static void main(String[] args){

//        String a = "kyoto";
//        String b = "tokyo";
        //Scanner cin = new Scanner(new FileReader("src\\AtcoderContest0805\\task2-test-input.txt"));
        Scanner cin = new Scanner(System.in);
        String a = cin.nextLine();
        if (a.charAt(0)!='A') {
            System.out.println("WA");
            return;
        }

        int count = 0;
        for (int i=0;i<a.length();i++){
                if (a.charAt(i)=='C') count++;
        }
        if (count>1) {
            System.out.println("WA");
            return;
        }
        else if (count==0) {
            System.out.println("WA");
            return;
        }
        else {
            if (a.indexOf("C")==1||a.indexOf("C")==a.length()-1) {
                System.out.println("WA");
                return;
            }
        }

        for (int i=1;i<a.length();i++) {
            if (a.charAt(i)=='C') continue;
            char temp = a.charAt(i);
            if (!(temp>='a'&&temp<='z')) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
        return;
    } main {

//        String a = "kyoto";
//        String b = "tokyo";
        //Scanner cin = new Scanner(new FileReader("src\\AtcoderContest0805\\task2-test-input.txt"));
        Scanner cin = new Scanner(System.in);
        String a = cin.nextLine();
        if (a.charAt(0)!='A') {
            System.out.println("WA");
            return;
        }

        int count = 0;
        for (int i=0;i<a.length();i++){
                if (a.charAt(i)=='C') count++;
        }
        if (count>1) {
            System.out.println("WA");
            return;
        }
        else if (count==0) {
            System.out.println("WA");
            return;
        }
        else {
            if (a.indexOf("C")==1||a.indexOf("C")==a.length()-1) {
                System.out.println("WA");
                return;
            }
        }

        for (int i=1;i<a.length();i++) {
            if (a.charAt(i)=='C') continue;
            char temp = a.charAt(i);
            if (!(temp>='a'&&temp<='z')) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
        return;
    } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) String a = cin.nextLine(); a cin.nextLine() cin.nextLine cin if (a.charAt(0)!='A') {
            System.out.println("WA");
            return;
        } a.charAt(0)!='A' a.charAt(0) a.charAt a 0 'A' {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; int count = 0; count 0 for (int i=0;i<a.length();i++){
                if (a.charAt(i)=='C') count++;
        } int i=0; int i=0; i 0 i<a.length() i a.length() a.length a i++ i++ i {
                if (a.charAt(i)=='C') count++;
        } {
                if (a.charAt(i)=='C') count++;
        } if (a.charAt(i)=='C') count++; a.charAt(i)=='C' a.charAt(i) a.charAt a i 'C' count++ count if (count>1) {
            System.out.println("WA");
            return;
        }
        else if (count==0) {
            System.out.println("WA");
            return;
        }
        else {
            if (a.indexOf("C")==1||a.indexOf("C")==a.length()-1) {
                System.out.println("WA");
                return;
            }
        } count>1 count 1 {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; if (count==0) {
            System.out.println("WA");
            return;
        }
        else {
            if (a.indexOf("C")==1||a.indexOf("C")==a.length()-1) {
                System.out.println("WA");
                return;
            }
        } count==0 count 0 {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; {
            if (a.indexOf("C")==1||a.indexOf("C")==a.length()-1) {
                System.out.println("WA");
                return;
            }
        } if (a.indexOf("C")==1||a.indexOf("C")==a.length()-1) {
                System.out.println("WA");
                return;
            } a.indexOf("C")==1||a.indexOf("C")==a.length()-1 a.indexOf("C")==1 a.indexOf("C") a.indexOf a "C" 1 a.indexOf("C")==a.length()-1 a.indexOf("C") a.indexOf a "C" a.length()-1 a.length() a.length a 1 {
                System.out.println("WA");
                return;
            } System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i=1;i<a.length();i++) {
            if (a.charAt(i)=='C') continue;
            char temp = a.charAt(i);
            if (!(temp>='a'&&temp<='z')) {
                System.out.println("WA");
                return;
            }
        } int i=1; int i=1; i 1 i<a.length() i a.length() a.length a i++ i++ i {
            if (a.charAt(i)=='C') continue;
            char temp = a.charAt(i);
            if (!(temp>='a'&&temp<='z')) {
                System.out.println("WA");
                return;
            }
        } {
            if (a.charAt(i)=='C') continue;
            char temp = a.charAt(i);
            if (!(temp>='a'&&temp<='z')) {
                System.out.println("WA");
                return;
            }
        } if (a.charAt(i)=='C') continue; a.charAt(i)=='C' a.charAt(i) a.charAt a i 'C' continue; char temp = a.charAt(i); temp a.charAt(i) a.charAt a i if (!(temp>='a'&&temp<='z')) {
                System.out.println("WA");
                return;
            } !(temp>='a'&&temp<='z') (temp>='a'&&temp<='z') temp>='a' temp 'a' temp<='z' temp 'z' {
                System.out.println("WA");
                return;
            } System.out.println("WA") System.out.println System.out System System.out "WA" return; System.out.println("AC") System.out.println System.out System System.out "AC" return; String[] args args public class Main {

    public static void main(String[] args){

//        String a = "kyoto";
//        String b = "tokyo";
        //Scanner cin = new Scanner(new FileReader("src\\AtcoderContest0805\\task2-test-input.txt"));
        Scanner cin = new Scanner(System.in);
        String a = cin.nextLine();
        if (a.charAt(0)!='A') {
            System.out.println("WA");
            return;
        }

        int count = 0;
        for (int i=0;i<a.length();i++){
                if (a.charAt(i)=='C') count++;
        }
        if (count>1) {
            System.out.println("WA");
            return;
        }
        else if (count==0) {
            System.out.println("WA");
            return;
        }
        else {
            if (a.indexOf("C")==1||a.indexOf("C")==a.length()-1) {
                System.out.println("WA");
                return;
            }
        }

        for (int i=1;i<a.length();i++) {
            if (a.charAt(i)=='C') continue;
            char temp = a.charAt(i);
            if (!(temp>='a'&&temp<='z')) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
        return;
    }

} public class Main {

    public static void main(String[] args){

//        String a = "kyoto";
//        String b = "tokyo";
        //Scanner cin = new Scanner(new FileReader("src\\AtcoderContest0805\\task2-test-input.txt"));
        Scanner cin = new Scanner(System.in);
        String a = cin.nextLine();
        if (a.charAt(0)!='A') {
            System.out.println("WA");
            return;
        }

        int count = 0;
        for (int i=0;i<a.length();i++){
                if (a.charAt(i)=='C') count++;
        }
        if (count>1) {
            System.out.println("WA");
            return;
        }
        else if (count==0) {
            System.out.println("WA");
            return;
        }
        else {
            if (a.indexOf("C")==1||a.indexOf("C")==a.length()-1) {
                System.out.println("WA");
                return;
            }
        }

        for (int i=1;i<a.length();i++) {
            if (a.charAt(i)=='C') continue;
            char temp = a.charAt(i);
            if (!(temp>='a'&&temp<='z')) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
        return;
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args){

//        String a = "kyoto";
//        String b = "tokyo";
        //Scanner cin = new Scanner(new FileReader("src\\AtcoderContest0805\\task2-test-input.txt"));
        Scanner cin = new Scanner(System.in);
        String a = cin.nextLine();
        if (a.charAt(0)!='A') {
            System.out.println("WA");
            return;
        }

        int count = 0;
        for (int i=0;i<a.length();i++){
                if (a.charAt(i)=='C') count++;
        }
        if (count>1) {
            System.out.println("WA");
            return;
        }
        else if (count==0) {
            System.out.println("WA");
            return;
        }
        else {
            if (a.indexOf("C")==1||a.indexOf("C")==a.length()-1) {
                System.out.println("WA");
                return;
            }
        }

        for (int i=1;i<a.length();i++) {
            if (a.charAt(i)=='C') continue;
            char temp = a.charAt(i);
            if (!(temp>='a'&&temp<='z')) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
        return;
    }

}