import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String result = "AC";
        int count = 0;
        for (int i = 0; i < s.length(); i++) {
            String one = s.substring(i, i + 1);
            if (i == 0) {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            }
            if ((i > 1) && (i < s.length() - 1)) {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            }
            if (Character.isUpperCase(one.toCharArray()[0])) {
                result = "WA";
                break;
            }
        }
        // 出力
        if (count != 1) {
            result = "WA";
        }
        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String result = "AC";
        int count = 0;
        for (int i = 0; i < s.length(); i++) {
            String one = s.substring(i, i + 1);
            if (i == 0) {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            }
            if ((i > 1) && (i < s.length() - 1)) {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            }
            if (Character.isUpperCase(one.toCharArray()[0])) {
                result = "WA";
                break;
            }
        }
        // 出力
        if (count != 1) {
            result = "WA";
        }
        System.out.println(result);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String result = "AC";
        int count = 0;
        for (int i = 0; i < s.length(); i++) {
            String one = s.substring(i, i + 1);
            if (i == 0) {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            }
            if ((i > 1) && (i < s.length() - 1)) {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            }
            if (Character.isUpperCase(one.toCharArray()[0])) {
                result = "WA";
                break;
            }
        }
        // 出力
        if (count != 1) {
            result = "WA";
        }
        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String result = "AC";
        int count = 0;
        for (int i = 0; i < s.length(); i++) {
            String one = s.substring(i, i + 1);
            if (i == 0) {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            }
            if ((i > 1) && (i < s.length() - 1)) {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            }
            if (Character.isUpperCase(one.toCharArray()[0])) {
                result = "WA";
                break;
            }
        }
        // 出力
        if (count != 1) {
            result = "WA";
        }
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String result = "AC"; result "AC" int count = 0; count 0 for (int i = 0; i < s.length(); i++) {
            String one = s.substring(i, i + 1);
            if (i == 0) {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            }
            if ((i > 1) && (i < s.length() - 1)) {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            }
            if (Character.isUpperCase(one.toCharArray()[0])) {
                result = "WA";
                break;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            String one = s.substring(i, i + 1);
            if (i == 0) {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            }
            if ((i > 1) && (i < s.length() - 1)) {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            }
            if (Character.isUpperCase(one.toCharArray()[0])) {
                result = "WA";
                break;
            }
        } {
            String one = s.substring(i, i + 1);
            if (i == 0) {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            }
            if ((i > 1) && (i < s.length() - 1)) {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            }
            if (Character.isUpperCase(one.toCharArray()[0])) {
                result = "WA";
                break;
            }
        } String one = s.substring(i, i + 1); one s.substring(i, i + 1) s.substring s i i + 1 i 1 if (i == 0) {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            } i == 0 i 0 {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            } if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                } !one.equals("A") one.equals("A") one.equals one "A" {
                    result = "WA";
                    break;
                } result = "WA" result "WA" break; {
                    continue;
                } continue; if ((i > 1) && (i < s.length() - 1)) {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            } (i > 1) && (i < s.length() - 1) (i > 1) i 1 (i < s.length() - 1) i s.length() - 1 s.length() s.length s 1 {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            } if (one.equals("C")) {
                    count++;
                    continue;
                } one.equals("C") one.equals one "C" {
                    count++;
                    continue;
                } count++ count continue; if (Character.isUpperCase(one.toCharArray()[0])) {
                result = "WA";
                break;
            } Character.isUpperCase(one.toCharArray()[0]) Character.isUpperCase Character one.toCharArray()[0] one.toCharArray() one.toCharArray one 0 {
                result = "WA";
                break;
            } result = "WA" result "WA" break; if (count != 1) {
            result = "WA";
        } count != 1 count 1 {
            result = "WA";
        } result = "WA" result "WA" System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String result = "AC";
        int count = 0;
        for (int i = 0; i < s.length(); i++) {
            String one = s.substring(i, i + 1);
            if (i == 0) {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            }
            if ((i > 1) && (i < s.length() - 1)) {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            }
            if (Character.isUpperCase(one.toCharArray()[0])) {
                result = "WA";
                break;
            }
        }
        // 出力
        if (count != 1) {
            result = "WA";
        }
        System.out.println(result);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String result = "AC";
        int count = 0;
        for (int i = 0; i < s.length(); i++) {
            String one = s.substring(i, i + 1);
            if (i == 0) {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            }
            if ((i > 1) && (i < s.length() - 1)) {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            }
            if (Character.isUpperCase(one.toCharArray()[0])) {
                result = "WA";
                break;
            }
        }
        // 出力
        if (count != 1) {
            result = "WA";
        }
        System.out.println(result);
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String result = "AC";
        int count = 0;
        for (int i = 0; i < s.length(); i++) {
            String one = s.substring(i, i + 1);
            if (i == 0) {
                if (!one.equals("A")) {
                    result = "WA";
                    break;
                } else {
                    continue;
                }
            }
            if ((i > 1) && (i < s.length() - 1)) {
                if (one.equals("C")) {
                    count++;
                    continue;
                }
            }
            if (Character.isUpperCase(one.toCharArray()[0])) {
                result = "WA";
                break;
            }
        }
        // 出力
        if (count != 1) {
            result = "WA";
        }
        System.out.println(result);
    }
}