import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String mes = sc.nextLine();
        int count = 0;
        boolean flag1 = false;
        boolean flag2 = false;
        boolean flag3 = false;
        if (mes.charAt(0) == 'A') {
            flag1 = true;
        }
        for (int i = 2; i < mes.length() - 1; i++) {
            if (mes.charAt(i) == 'C') {
                count++;
            }
        }
        if (count == 1) {
            flag2 = true;
        }
        String MES = mes.toUpperCase();
        int check = 0;
        for (int i = 0; i < mes.length(); i++) {
            if (MES.charAt(i) == mes.charAt(i)) {
                check++;
            }
        }
        if (check == 2) {
            flag3 = true;
        }
        if (flag1 && flag2 && flag3) {
            System.out.println("AC");
        } 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 mes = sc.nextLine();
        int count = 0;
        boolean flag1 = false;
        boolean flag2 = false;
        boolean flag3 = false;
        if (mes.charAt(0) == 'A') {
            flag1 = true;
        }
        for (int i = 2; i < mes.length() - 1; i++) {
            if (mes.charAt(i) == 'C') {
                count++;
            }
        }
        if (count == 1) {
            flag2 = true;
        }
        String MES = mes.toUpperCase();
        int check = 0;
        for (int i = 0; i < mes.length(); i++) {
            if (MES.charAt(i) == mes.charAt(i)) {
                check++;
            }
        }
        if (check == 2) {
            flag3 = true;
        }
        if (flag1 && flag2 && flag3) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String mes = sc.nextLine();
        int count = 0;
        boolean flag1 = false;
        boolean flag2 = false;
        boolean flag3 = false;
        if (mes.charAt(0) == 'A') {
            flag1 = true;
        }
        for (int i = 2; i < mes.length() - 1; i++) {
            if (mes.charAt(i) == 'C') {
                count++;
            }
        }
        if (count == 1) {
            flag2 = true;
        }
        String MES = mes.toUpperCase();
        int check = 0;
        for (int i = 0; i < mes.length(); i++) {
            if (MES.charAt(i) == mes.charAt(i)) {
                check++;
            }
        }
        if (check == 2) {
            flag3 = true;
        }
        if (flag1 && flag2 && flag3) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String mes = sc.nextLine();
        int count = 0;
        boolean flag1 = false;
        boolean flag2 = false;
        boolean flag3 = false;
        if (mes.charAt(0) == 'A') {
            flag1 = true;
        }
        for (int i = 2; i < mes.length() - 1; i++) {
            if (mes.charAt(i) == 'C') {
                count++;
            }
        }
        if (count == 1) {
            flag2 = true;
        }
        String MES = mes.toUpperCase();
        int check = 0;
        for (int i = 0; i < mes.length(); i++) {
            if (MES.charAt(i) == mes.charAt(i)) {
                check++;
            }
        }
        if (check == 2) {
            flag3 = true;
        }
        if (flag1 && flag2 && flag3) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String mes = sc.nextLine(); mes sc.nextLine() sc.nextLine sc int count = 0; count 0 boolean flag1 = false; flag1 false boolean flag2 = false; flag2 false boolean flag3 = false; flag3 false if (mes.charAt(0) == 'A') {
            flag1 = true;
        } mes.charAt(0) == 'A' mes.charAt(0) mes.charAt mes 0 'A' {
            flag1 = true;
        } flag1 = true flag1 true for (int i = 2; i < mes.length() - 1; i++) {
            if (mes.charAt(i) == 'C') {
                count++;
            }
        } int i = 2; int i = 2; i 2 i < mes.length() - 1 i mes.length() - 1 mes.length() mes.length mes 1 i++ i++ i {
            if (mes.charAt(i) == 'C') {
                count++;
            }
        } {
            if (mes.charAt(i) == 'C') {
                count++;
            }
        } if (mes.charAt(i) == 'C') {
                count++;
            } mes.charAt(i) == 'C' mes.charAt(i) mes.charAt mes i 'C' {
                count++;
            } count++ count if (count == 1) {
            flag2 = true;
        } count == 1 count 1 {
            flag2 = true;
        } flag2 = true flag2 true String MES = mes.toUpperCase(); MES mes.toUpperCase() mes.toUpperCase mes int check = 0; check 0 for (int i = 0; i < mes.length(); i++) {
            if (MES.charAt(i) == mes.charAt(i)) {
                check++;
            }
        } int i = 0; int i = 0; i 0 i < mes.length() i mes.length() mes.length mes i++ i++ i {
            if (MES.charAt(i) == mes.charAt(i)) {
                check++;
            }
        } {
            if (MES.charAt(i) == mes.charAt(i)) {
                check++;
            }
        } if (MES.charAt(i) == mes.charAt(i)) {
                check++;
            } MES.charAt(i) == mes.charAt(i) MES.charAt(i) MES.charAt MES i mes.charAt(i) mes.charAt mes i {
                check++;
            } check++ check if (check == 2) {
            flag3 = true;
        } check == 2 check 2 {
            flag3 = true;
        } flag3 = true flag3 true if (flag1 && flag2 && flag3) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        } flag1 && flag2 && flag3 flag1 && flag2 && flag3 flag1 flag2 flag3 {
            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" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String mes = sc.nextLine();
        int count = 0;
        boolean flag1 = false;
        boolean flag2 = false;
        boolean flag3 = false;
        if (mes.charAt(0) == 'A') {
            flag1 = true;
        }
        for (int i = 2; i < mes.length() - 1; i++) {
            if (mes.charAt(i) == 'C') {
                count++;
            }
        }
        if (count == 1) {
            flag2 = true;
        }
        String MES = mes.toUpperCase();
        int check = 0;
        for (int i = 0; i < mes.length(); i++) {
            if (MES.charAt(i) == mes.charAt(i)) {
                check++;
            }
        }
        if (check == 2) {
            flag3 = true;
        }
        if (flag1 && flag2 && flag3) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String mes = sc.nextLine();
        int count = 0;
        boolean flag1 = false;
        boolean flag2 = false;
        boolean flag3 = false;
        if (mes.charAt(0) == 'A') {
            flag1 = true;
        }
        for (int i = 2; i < mes.length() - 1; i++) {
            if (mes.charAt(i) == 'C') {
                count++;
            }
        }
        if (count == 1) {
            flag2 = true;
        }
        String MES = mes.toUpperCase();
        int check = 0;
        for (int i = 0; i < mes.length(); i++) {
            if (MES.charAt(i) == mes.charAt(i)) {
                check++;
            }
        }
        if (check == 2) {
            flag3 = true;
        }
        if (flag1 && flag2 && flag3) {
            System.out.println("AC");
        } 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 mes = sc.nextLine();
        int count = 0;
        boolean flag1 = false;
        boolean flag2 = false;
        boolean flag3 = false;
        if (mes.charAt(0) == 'A') {
            flag1 = true;
        }
        for (int i = 2; i < mes.length() - 1; i++) {
            if (mes.charAt(i) == 'C') {
                count++;
            }
        }
        if (count == 1) {
            flag2 = true;
        }
        String MES = mes.toUpperCase();
        int check = 0;
        for (int i = 0; i < mes.length(); i++) {
            if (MES.charAt(i) == mes.charAt(i)) {
                check++;
            }
        }
        if (check == 2) {
            flag3 = true;
        }
        if (flag1 && flag2 && flag3) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
}