import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        boolean foundC = false;
        if (S[0] == 'A') {
            if (S[1] >= 'A' && S[1] <= 'Z') {
                System.out.println("WA");
                return;
            }

            for (int i = 2; i <= S.length - 2; i++) {
                if (S[i] == 'C') {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } else if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                }
            }

            char lastch = S[S.length - 1];
            if (lastch >= 'A' && lastch <= 'Z') {
                System.out.println("WA");
                return;
            }
        }

        if (foundC) System.out.println("AC");
        else System.out.println("WA");

        return;
    }

} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
} Main public static void main(String[] args) {
        new Solver().run();
    } main {
        new Solver().run();
    } new Solver().run() new Solver().run new Solver() String[] args args class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        boolean foundC = false;
        if (S[0] == 'A') {
            if (S[1] >= 'A' && S[1] <= 'Z') {
                System.out.println("WA");
                return;
            }

            for (int i = 2; i <= S.length - 2; i++) {
                if (S[i] == 'C') {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } else if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                }
            }

            char lastch = S[S.length - 1];
            if (lastch >= 'A' && lastch <= 'Z') {
                System.out.println("WA");
                return;
            }
        }

        if (foundC) System.out.println("AC");
        else System.out.println("WA");

        return;
    }

} Solver public void run() {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        boolean foundC = false;
        if (S[0] == 'A') {
            if (S[1] >= 'A' && S[1] <= 'Z') {
                System.out.println("WA");
                return;
            }

            for (int i = 2; i <= S.length - 2; i++) {
                if (S[i] == 'C') {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } else if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                }
            }

            char lastch = S[S.length - 1];
            if (lastch >= 'A' && lastch <= 'Z') {
                System.out.println("WA");
                return;
            }
        }

        if (foundC) System.out.println("AC");
        else System.out.println("WA");

        return;
    } run {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        boolean foundC = false;
        if (S[0] == 'A') {
            if (S[1] >= 'A' && S[1] <= 'Z') {
                System.out.println("WA");
                return;
            }

            for (int i = 2; i <= S.length - 2; i++) {
                if (S[i] == 'C') {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } else if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                }
            }

            char lastch = S[S.length - 1];
            if (lastch >= 'A' && lastch <= 'Z') {
                System.out.println("WA");
                return;
            }
        }

        if (foundC) System.out.println("AC");
        else System.out.println("WA");

        return;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] S = sc.next().toCharArray(); S sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc boolean foundC = false; foundC false if (S[0] == 'A') {
            if (S[1] >= 'A' && S[1] <= 'Z') {
                System.out.println("WA");
                return;
            }

            for (int i = 2; i <= S.length - 2; i++) {
                if (S[i] == 'C') {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } else if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                }
            }

            char lastch = S[S.length - 1];
            if (lastch >= 'A' && lastch <= 'Z') {
                System.out.println("WA");
                return;
            }
        } S[0] == 'A' S[0] S 0 'A' {
            if (S[1] >= 'A' && S[1] <= 'Z') {
                System.out.println("WA");
                return;
            }

            for (int i = 2; i <= S.length - 2; i++) {
                if (S[i] == 'C') {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } else if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                }
            }

            char lastch = S[S.length - 1];
            if (lastch >= 'A' && lastch <= 'Z') {
                System.out.println("WA");
                return;
            }
        } if (S[1] >= 'A' && S[1] <= 'Z') {
                System.out.println("WA");
                return;
            } S[1] >= 'A' && S[1] <= 'Z' S[1] >= 'A' S[1] S 1 'A' S[1] <= 'Z' S[1] S 1 'Z' {
                System.out.println("WA");
                return;
            } System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i = 2; i <= S.length - 2; i++) {
                if (S[i] == 'C') {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } else if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                }
            } int i = 2; int i = 2; i 2 i <= S.length - 2 i S.length - 2 S.length S S.length 2 i++ i++ i {
                if (S[i] == 'C') {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } else if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                }
            } {
                if (S[i] == 'C') {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } else if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                }
            } if (S[i] == 'C') {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } else if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                } S[i] == 'C' S[i] S i 'C' {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true; foundC {
                        System.out.println("WA");
                        return;
                    } System.out.println("WA") System.out.println System.out System System.out "WA" return; foundC = true foundC true if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                } S[i] >= 'A' && S[i] <= 'Z' S[i] >= 'A' S[i] S i 'A' S[i] <= 'Z' S[i] S i 'Z' {
                    System.out.println("WA");
                    return;
                } System.out.println("WA") System.out.println System.out System System.out "WA" return; char lastch = S[S.length - 1]; lastch S[S.length - 1] S S.length - 1 S.length S S.length 1 if (lastch >= 'A' && lastch <= 'Z') {
                System.out.println("WA");
                return;
            } lastch >= 'A' && lastch <= 'Z' lastch >= 'A' lastch 'A' lastch <= 'Z' lastch 'Z' {
                System.out.println("WA");
                return;
            } System.out.println("WA") System.out.println System.out System System.out "WA" return; if (foundC) System.out.println("AC");
        else System.out.println("WA"); foundC System.out.println("AC") System.out.println System.out System System.out "AC" System.out.println("WA") System.out.println System.out System System.out "WA" return;
import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        boolean foundC = false;
        if (S[0] == 'A') {
            if (S[1] >= 'A' && S[1] <= 'Z') {
                System.out.println("WA");
                return;
            }

            for (int i = 2; i <= S.length - 2; i++) {
                if (S[i] == 'C') {
                    if (foundC) {
                        System.out.println("WA");
                        return;
                    }
                    else foundC = true;
                } else if (S[i] >= 'A' && S[i] <= 'Z') {
                    System.out.println("WA");
                    return;
                }
            }

            char lastch = S[S.length - 1];
            if (lastch >= 'A' && lastch <= 'Z') {
                System.out.println("WA");
                return;
            }
        }

        if (foundC) System.out.println("AC");
        else System.out.println("WA");

        return;
    }

}