import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();
            boolean ac = true;
            if (S.charAt(0) == 'A') {
            } else {
                ac = false;
            }
            int count = 0;
            int index = -1;
            for (int i = 2; i <= S.length() - 2; i++) {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            }
            if (count == 1) {
            } else {
                ac = false;
            }
            for (int i = 1; i < S.length(); i++) {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            }
            System.out.println(ac ? "AC" : "WA");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();
            boolean ac = true;
            if (S.charAt(0) == 'A') {
            } else {
                ac = false;
            }
            int count = 0;
            int index = -1;
            for (int i = 2; i <= S.length() - 2; i++) {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            }
            if (count == 1) {
            } else {
                ac = false;
            }
            for (int i = 1; i < S.length(); i++) {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            }
            System.out.println(ac ? "AC" : "WA");
        }
    }
} Main public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();
            boolean ac = true;
            if (S.charAt(0) == 'A') {
            } else {
                ac = false;
            }
            int count = 0;
            int index = -1;
            for (int i = 2; i <= S.length() - 2; i++) {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            }
            if (count == 1) {
            } else {
                ac = false;
            }
            for (int i = 1; i < S.length(); i++) {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            }
            System.out.println(ac ? "AC" : "WA");
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();
            boolean ac = true;
            if (S.charAt(0) == 'A') {
            } else {
                ac = false;
            }
            int count = 0;
            int index = -1;
            for (int i = 2; i <= S.length() - 2; i++) {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            }
            if (count == 1) {
            } else {
                ac = false;
            }
            for (int i = 1; i < S.length(); i++) {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            }
            System.out.println(ac ? "AC" : "WA");
        }
    } try (Scanner in = new Scanner(System.in)) {
            String S = in.next();
            boolean ac = true;
            if (S.charAt(0) == 'A') {
            } else {
                ac = false;
            }
            int count = 0;
            int index = -1;
            for (int i = 2; i <= S.length() - 2; i++) {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            }
            if (count == 1) {
            } else {
                ac = false;
            }
            for (int i = 1; i < S.length(); i++) {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            }
            System.out.println(ac ? "AC" : "WA");
        } {
            String S = in.next();
            boolean ac = true;
            if (S.charAt(0) == 'A') {
            } else {
                ac = false;
            }
            int count = 0;
            int index = -1;
            for (int i = 2; i <= S.length() - 2; i++) {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            }
            if (count == 1) {
            } else {
                ac = false;
            }
            for (int i = 1; i < S.length(); i++) {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            }
            System.out.println(ac ? "AC" : "WA");
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) String S = in.next(); S in.next() in.next in boolean ac = true; ac true if (S.charAt(0) == 'A') {
            } else {
                ac = false;
            } S.charAt(0) == 'A' S.charAt(0) S.charAt S 0 'A' {
            } {
                ac = false;
            } ac = false ac false int count = 0; count 0 int index = -1; index -1 1 for (int i = 2; i <= S.length() - 2; i++) {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            } int i = 2; int i = 2; i 2 i <= S.length() - 2 i S.length() - 2 S.length() S.length S 2 i++ i++ i {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            } {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            } if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                } S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
                    count++;
                    index = i;
                } count++ count index = i index i if (count == 1) {
            } else {
                ac = false;
            } count == 1 count 1 {
            } {
                ac = false;
            } ac = false ac false for (int i = 1; i < S.length(); i++) {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            } int i = 1; int i = 1; i 1 i < S.length() i S.length() S.length S i++ i++ i {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            } {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            } if (i == index) {
                    continue;
                } i == index i index {
                    continue;
                } continue; if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                } S.charAt(i) >= 'a' && S.charAt(i) <= 'z' S.charAt(i) >= 'a' S.charAt(i) S.charAt S i 'a' S.charAt(i) <= 'z' S.charAt(i) S.charAt S i 'z' {
                } {
                    ac = false;
                } ac = false ac false System.out.println(ac ? "AC" : "WA") System.out.println System.out System System.out ac ? "AC" : "WA" ac "AC" "WA" String args[] args public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();
            boolean ac = true;
            if (S.charAt(0) == 'A') {
            } else {
                ac = false;
            }
            int count = 0;
            int index = -1;
            for (int i = 2; i <= S.length() - 2; i++) {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            }
            if (count == 1) {
            } else {
                ac = false;
            }
            for (int i = 1; i < S.length(); i++) {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            }
            System.out.println(ac ? "AC" : "WA");
        }
    }
} public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();
            boolean ac = true;
            if (S.charAt(0) == 'A') {
            } else {
                ac = false;
            }
            int count = 0;
            int index = -1;
            for (int i = 2; i <= S.length() - 2; i++) {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            }
            if (count == 1) {
            } else {
                ac = false;
            }
            for (int i = 1; i < S.length(); i++) {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            }
            System.out.println(ac ? "AC" : "WA");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();
            boolean ac = true;
            if (S.charAt(0) == 'A') {
            } else {
                ac = false;
            }
            int count = 0;
            int index = -1;
            for (int i = 2; i <= S.length() - 2; i++) {
                if (S.charAt(i) == 'C') {
                    count++;
                    index = i;
                }
            }
            if (count == 1) {
            } else {
                ac = false;
            }
            for (int i = 1; i < S.length(); i++) {
                if (i == index) {
                    continue;
                }
                if (S.charAt(i) >= 'a' && S.charAt(i) <= 'z') {
                } else {
                    ac = false;
                }
            }
            System.out.println(ac ? "AC" : "WA");
        }
    }
}
