import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String[] ar = str.split("");
        int n = 0;
        int m = 0;
        int num = 0;
        int length = str.length();

        String a = "A";
        String c = "C";




        if(ar[0].equals(a)){
            n = 0;
            for(int i = 2; i<str.length()-1; i++){
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            }


            if(n == 1){
                for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                }

                if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }

            }else{
                System.out.println("WA");
            }
        }else{
            System.out.println("WA");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String[] ar = str.split("");
        int n = 0;
        int m = 0;
        int num = 0;
        int length = str.length();

        String a = "A";
        String c = "C";




        if(ar[0].equals(a)){
            n = 0;
            for(int i = 2; i<str.length()-1; i++){
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            }


            if(n == 1){
                for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                }

                if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }

            }else{
                System.out.println("WA");
            }
        }else{
            System.out.println("WA");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String[] ar = str.split("");
        int n = 0;
        int m = 0;
        int num = 0;
        int length = str.length();

        String a = "A";
        String c = "C";




        if(ar[0].equals(a)){
            n = 0;
            for(int i = 2; i<str.length()-1; i++){
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            }


            if(n == 1){
                for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                }

                if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }

            }else{
                System.out.println("WA");
            }
        }else{
            System.out.println("WA");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String[] ar = str.split("");
        int n = 0;
        int m = 0;
        int num = 0;
        int length = str.length();

        String a = "A";
        String c = "C";




        if(ar[0].equals(a)){
            n = 0;
            for(int i = 2; i<str.length()-1; i++){
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            }


            if(n == 1){
                for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                }

                if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }

            }else{
                System.out.println("WA");
            }
        }else{
            System.out.println("WA");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc String[] ar = str.split(""); ar str.split("") str.split str "" int n = 0; n 0 int m = 0; m 0 int num = 0; num 0 int length = str.length(); length str.length() str.length str String a = "A"; a "A" String c = "C"; c "C" if(ar[0].equals(a)){
            n = 0;
            for(int i = 2; i<str.length()-1; i++){
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            }


            if(n == 1){
                for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                }

                if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }

            }else{
                System.out.println("WA");
            }
        }else{
            System.out.println("WA");
        } ar[0].equals(a) ar[0].equals ar[0] ar 0 a {
            n = 0;
            for(int i = 2; i<str.length()-1; i++){
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            }


            if(n == 1){
                for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                }

                if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }

            }else{
                System.out.println("WA");
            }
        } n = 0 n 0 for(int i = 2; i<str.length()-1; i++){
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            } int i = 2; int i = 2; i 2 i<str.length()-1 i str.length()-1 str.length() str.length str 1 i++ i++ i {
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            } {
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            } if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                } ar[i].equals(c) ar[i].equals ar[i] ar i c {
                    n++;
                    num = i;
                } n++ n num = i num i {
                } if(n == 1){
                for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                }

                if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }

            }else{
                System.out.println("WA");
            } n == 1 n 1 {
                for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                }

                if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }

            } for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                } int i = 0; int i = 0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                } {
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                } if(i == 0 || i == num){
                        continue;
                    } i == 0 || i == num i == 0 i 0 i == num i num {
                        continue;
                    } continue; if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    } Character.isLowerCase(str.charAt(i)) Character.isLowerCase Character str.charAt(i) str.charAt str i {
                    } {
                        m++;
                    } m++ m if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                } m == 0 m 0 {
                    System.out.println("AC");
                } System.out.println("AC") System.out.println System.out System System.out "AC" {
                    System.out.println("WA");
                } System.out.println("WA") System.out.println System.out System System.out "WA" {
                System.out.println("WA");
            } System.out.println("WA") System.out.println System.out System System.out "WA" {
            System.out.println("WA");
        } 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) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String[] ar = str.split("");
        int n = 0;
        int m = 0;
        int num = 0;
        int length = str.length();

        String a = "A";
        String c = "C";




        if(ar[0].equals(a)){
            n = 0;
            for(int i = 2; i<str.length()-1; i++){
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            }


            if(n == 1){
                for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                }

                if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }

            }else{
                System.out.println("WA");
            }
        }else{
            System.out.println("WA");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String[] ar = str.split("");
        int n = 0;
        int m = 0;
        int num = 0;
        int length = str.length();

        String a = "A";
        String c = "C";




        if(ar[0].equals(a)){
            n = 0;
            for(int i = 2; i<str.length()-1; i++){
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            }


            if(n == 1){
                for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                }

                if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }

            }else{
                System.out.println("WA");
            }
        }else{
            System.out.println("WA");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String[] ar = str.split("");
        int n = 0;
        int m = 0;
        int num = 0;
        int length = str.length();

        String a = "A";
        String c = "C";




        if(ar[0].equals(a)){
            n = 0;
            for(int i = 2; i<str.length()-1; i++){
                if(ar[i].equals(c)){
                    n++;
                    num = i;
                }else{
                }
            }


            if(n == 1){
                for(int i = 0; i<str.length(); i++){
                    if(i == 0 || i == num){
                        continue;
                    }
                    if(Character.isLowerCase(str.charAt(i))){
                    }else{
                        m++;
                    }
                }

                if(m == 0){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }

            }else{
                System.out.println("WA");
            }
        }else{
            System.out.println("WA");
        }
    }
}
