
import java.util.Comparator;
import java.util.Scanner;


public class Main {
    Scanner sc = new Scanner(System.in);
    String s;
    public void run(){
        s = sc.next();
        solve();
    }
    public void solve(){
        int ans = 0;
        if(s.substring(0, 1).equals("A")){
            int c = -1;
            for(int i = 2; i < s.length() - 1; i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            }
            if(c != -1) {
                int flag = 1;
                for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                }
                if(flag != -1) ans = 1;
            }
        }


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

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

    static class Pair {
        int first,second;
        public Pair(int a,int b) {
            this.first = a;
            this.second = b;
        }
    }
    static class Edge{
        int to, cost;
        public Edge(int a, int b){
            this.to = a;
            this.cost = b;
        }
    }
    class MyComparator implements Comparator {
        @Override
        public int compare (Object arg0, Object arg1) {
            int x = ((Pair)arg0).first;
            int y = ((Pair)arg1).first;

            if (x < y) {
                return 1;
            } else if (x > y) {
                return -1;
            } else{
                return 0;
            }
        }
    }
    static class UnionFind{
        int par[];
        int rank[];

        //n要素で初期化
        public UnionFind(int maxn){
            par = new int[maxn];
            rank = new int[maxn];

            for(int i = 0; i < maxn; i++){
                par[i] = i;
                rank[i] = 0;
            }
        }

        //木の根を求める
        int find(int x){
            if(par[x] == x){
                return x;
            }
            else {
                return par[x] = find(par[x]);
            }
        }

        // xとyの属する集合を併合
        void unite (int x, int y){
            x = find(x);
            y = find(y);
            if(x == y){
                return;
            }

            if(rank[x] < rank[y]){
                par[x] = y;
            }
            else{
                par[y] = x;
                if(rank[x] == rank[y]) rank[x]++;
            }
        }

        // xとyが同じ集合に属するか否か
        boolean same(int x, int y){
            return find(x) == find(y);
        }
    }

} import java.util.Comparator; Comparator java.util import java.util.Scanner; Scanner java.util public class Main {
    Scanner sc = new Scanner(System.in);
    String s;
    public void run(){
        s = sc.next();
        solve();
    }
    public void solve(){
        int ans = 0;
        if(s.substring(0, 1).equals("A")){
            int c = -1;
            for(int i = 2; i < s.length() - 1; i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            }
            if(c != -1) {
                int flag = 1;
                for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                }
                if(flag != -1) ans = 1;
            }
        }


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

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

    static class Pair {
        int first,second;
        public Pair(int a,int b) {
            this.first = a;
            this.second = b;
        }
    }
    static class Edge{
        int to, cost;
        public Edge(int a, int b){
            this.to = a;
            this.cost = b;
        }
    }
    class MyComparator implements Comparator {
        @Override
        public int compare (Object arg0, Object arg1) {
            int x = ((Pair)arg0).first;
            int y = ((Pair)arg1).first;

            if (x < y) {
                return 1;
            } else if (x > y) {
                return -1;
            } else{
                return 0;
            }
        }
    }
    static class UnionFind{
        int par[];
        int rank[];

        //n要素で初期化
        public UnionFind(int maxn){
            par = new int[maxn];
            rank = new int[maxn];

            for(int i = 0; i < maxn; i++){
                par[i] = i;
                rank[i] = 0;
            }
        }

        //木の根を求める
        int find(int x){
            if(par[x] == x){
                return x;
            }
            else {
                return par[x] = find(par[x]);
            }
        }

        // xとyの属する集合を併合
        void unite (int x, int y){
            x = find(x);
            y = find(y);
            if(x == y){
                return;
            }

            if(rank[x] < rank[y]){
                par[x] = y;
            }
            else{
                par[y] = x;
                if(rank[x] == rank[y]) rank[x]++;
            }
        }

        // xとyが同じ集合に属するか否か
        boolean same(int x, int y){
            return find(x) == find(y);
        }
    }

} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s; s public void run(){
        s = sc.next();
        solve();
    } run {
        s = sc.next();
        solve();
    } s = sc.next() s sc.next() sc.next sc solve() solve public void solve(){
        int ans = 0;
        if(s.substring(0, 1).equals("A")){
            int c = -1;
            for(int i = 2; i < s.length() - 1; i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            }
            if(c != -1) {
                int flag = 1;
                for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                }
                if(flag != -1) ans = 1;
            }
        }


        if(ans == 0){
            System.out.println("WA");
        }
        else{
            System.out.println("AC");
        }
    } solve {
        int ans = 0;
        if(s.substring(0, 1).equals("A")){
            int c = -1;
            for(int i = 2; i < s.length() - 1; i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            }
            if(c != -1) {
                int flag = 1;
                for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                }
                if(flag != -1) ans = 1;
            }
        }


        if(ans == 0){
            System.out.println("WA");
        }
        else{
            System.out.println("AC");
        }
    } int ans = 0; ans 0 if(s.substring(0, 1).equals("A")){
            int c = -1;
            for(int i = 2; i < s.length() - 1; i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            }
            if(c != -1) {
                int flag = 1;
                for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                }
                if(flag != -1) ans = 1;
            }
        } s.substring(0, 1).equals("A") s.substring(0, 1).equals s.substring(0, 1) s.substring s 0 1 "A" {
            int c = -1;
            for(int i = 2; i < s.length() - 1; i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            }
            if(c != -1) {
                int flag = 1;
                for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                }
                if(flag != -1) ans = 1;
            }
        } int c = -1; c -1 1 for(int i = 2; i < s.length() - 1; i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            } int i = 2; int i = 2; i 2 i < s.length() - 1 i s.length() - 1 s.length() s.length s 1 i++ i++ i {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            } {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            } if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                } s.substring(i, i + 1).equals("C") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "C" {
                    c = i;
                    break;
                } c = i c i break; if(c != -1) {
                int flag = 1;
                for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                }
                if(flag != -1) ans = 1;
            } c != -1 c -1 1 {
                int flag = 1;
                for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                }
                if(flag != -1) ans = 1;
            } int flag = 1; flag 1 for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                } {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                } if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    } i != c i c {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    } char t = s.charAt(i); t s.charAt(i) s.charAt s i if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        } t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z' t == 'y' t == 'x' t == 'w' t == 'v' t == 'u' t == 't' t == 's' t == 'r' t == 'q' t == 'p' t == 'o' t == 'n' t == 'm' t == 'l' t == 'k' t == 'j' t == 'i' t == 'h' t == 'g' t == 'f' t == 'e' t == 'd' t == 'c' t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z' t == 'a' t 'a' t == 'b' t 'b' t == 'c' t 'c' t == 'd' t 'd' t == 'e' t 'e' t == 'f' t 'f' t == 'g' t 'g' t == 'h' t 'h' t == 'i' t 'i' t == 'j' t 'j' t == 'k' t 'k' t == 'l' t 'l' t == 'm' t 'm' t == 'n' t 'n' t == 'o' t 'o' t == 'p' t 'p' t == 'q' t 'q' t == 'r' t 'r' t == 's' t 's' t == 't' t 't' t == 'u' t 'u' t == 'v' t 'v' t == 'w' t 'w' t == 'x' t 'x' t == 'y' t 'y' t == 'z' t 'z' {

                        } {
                            flag = -1;
                        } flag = -1 flag -1 1 if(flag != -1) ans = 1; flag != -1 flag -1 1 ans = 1 ans 1 if(ans == 0){
            System.out.println("WA");
        }
        else{
            System.out.println("AC");
        } ans == 0 ans 0 {
            System.out.println("WA");
        } System.out.println("WA") System.out.println System.out System System.out "WA" {
            System.out.println("AC");
        } System.out.println("AC") System.out.println System.out System System.out "AC" public static void main(String[] args){
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args static class Pair {
        int first,second;
        public Pair(int a,int b) {
            this.first = a;
            this.second = b;
        }
    } Pair int first first second; second public Pair(int a,int b) {
            this.first = a;
            this.second = b;
        } Pair {
            this.first = a;
            this.second = b;
        } this.first = a this.first this this.first a this.second = b this.second this this.second b int a a int b b static class Edge{
        int to, cost;
        public Edge(int a, int b){
            this.to = a;
            this.cost = b;
        }
    } Edge int to to cost; cost public Edge(int a, int b){
            this.to = a;
            this.cost = b;
        } Edge {
            this.to = a;
            this.cost = b;
        } this.to = a this.to this this.to a this.cost = b this.cost this this.cost b int a a int b b class MyComparator implements Comparator {
        @Override
        public int compare (Object arg0, Object arg1) {
            int x = ((Pair)arg0).first;
            int y = ((Pair)arg1).first;

            if (x < y) {
                return 1;
            } else if (x > y) {
                return -1;
            } else{
                return 0;
            }
        }
    } MyComparator @Override
        public int compare (Object arg0, Object arg1) {
            int x = ((Pair)arg0).first;
            int y = ((Pair)arg1).first;

            if (x < y) {
                return 1;
            } else if (x > y) {
                return -1;
            } else{
                return 0;
            }
        } compare {
            int x = ((Pair)arg0).first;
            int y = ((Pair)arg1).first;

            if (x < y) {
                return 1;
            } else if (x > y) {
                return -1;
            } else{
                return 0;
            }
        } int x = ((Pair)arg0).first; x ((Pair)arg0).first ((Pair)arg0) ((Pair)arg0).first int y = ((Pair)arg1).first; y ((Pair)arg1).first ((Pair)arg1) ((Pair)arg1).first if (x < y) {
                return 1;
            } else if (x > y) {
                return -1;
            } else{
                return 0;
            } x < y x y {
                return 1;
            } return 1; 1 if (x > y) {
                return -1;
            } else{
                return 0;
            } x > y x y {
                return -1;
            } return -1; -1 1 {
                return 0;
            } return 0; 0 Object arg0 arg0 Object arg1 arg1 Comparator static class UnionFind{
        int par[];
        int rank[];

        //n要素で初期化
        public UnionFind(int maxn){
            par = new int[maxn];
            rank = new int[maxn];

            for(int i = 0; i < maxn; i++){
                par[i] = i;
                rank[i] = 0;
            }
        }

        //木の根を求める
        int find(int x){
            if(par[x] == x){
                return x;
            }
            else {
                return par[x] = find(par[x]);
            }
        }

        // xとyの属する集合を併合
        void unite (int x, int y){
            x = find(x);
            y = find(y);
            if(x == y){
                return;
            }

            if(rank[x] < rank[y]){
                par[x] = y;
            }
            else{
                par[y] = x;
                if(rank[x] == rank[y]) rank[x]++;
            }
        }

        // xとyが同じ集合に属するか否か
        boolean same(int x, int y){
            return find(x) == find(y);
        }
    } UnionFind int par[]; par int rank[]; rank //n要素で初期化
        public UnionFind(int maxn){
            par = new int[maxn];
            rank = new int[maxn];

            for(int i = 0; i < maxn; i++){
                par[i] = i;
                rank[i] = 0;
            }
        } UnionFind {
            par = new int[maxn];
            rank = new int[maxn];

            for(int i = 0; i < maxn; i++){
                par[i] = i;
                rank[i] = 0;
            }
        } par = new int[maxn] par new int[maxn] maxn rank = new int[maxn] rank new int[maxn] maxn for(int i = 0; i < maxn; i++){
                par[i] = i;
                rank[i] = 0;
            } int i = 0; int i = 0; i 0 i < maxn i maxn i++ i++ i {
                par[i] = i;
                rank[i] = 0;
            } {
                par[i] = i;
                rank[i] = 0;
            } par[i] = i par[i] par i i rank[i] = 0 rank[i] rank i 0 int maxn maxn //木の根を求める
        int find(int x){
            if(par[x] == x){
                return x;
            }
            else {
                return par[x] = find(par[x]);
            }
        } find {
            if(par[x] == x){
                return x;
            }
            else {
                return par[x] = find(par[x]);
            }
        } if(par[x] == x){
                return x;
            }
            else {
                return par[x] = find(par[x]);
            } par[x] == x par[x] par x x {
                return x;
            } return x; x {
                return par[x] = find(par[x]);
            } return par[x] = find(par[x]); par[x] = find(par[x]) par[x] par x find(par[x]) find par[x] par x int x x // xとyの属する集合を併合
        void unite (int x, int y){
            x = find(x);
            y = find(y);
            if(x == y){
                return;
            }

            if(rank[x] < rank[y]){
                par[x] = y;
            }
            else{
                par[y] = x;
                if(rank[x] == rank[y]) rank[x]++;
            }
        } unite {
            x = find(x);
            y = find(y);
            if(x == y){
                return;
            }

            if(rank[x] < rank[y]){
                par[x] = y;
            }
            else{
                par[y] = x;
                if(rank[x] == rank[y]) rank[x]++;
            }
        } x = find(x) x find(x) find x y = find(y) y find(y) find y if(x == y){
                return;
            } x == y x y {
                return;
            } return; if(rank[x] < rank[y]){
                par[x] = y;
            }
            else{
                par[y] = x;
                if(rank[x] == rank[y]) rank[x]++;
            } rank[x] < rank[y] rank[x] rank x rank[y] rank y {
                par[x] = y;
            } par[x] = y par[x] par x y {
                par[y] = x;
                if(rank[x] == rank[y]) rank[x]++;
            } par[y] = x par[y] par y x if(rank[x] == rank[y]) rank[x]++; rank[x] == rank[y] rank[x] rank x rank[y] rank y rank[x]++ rank[x] rank x int x x int y y // xとyが同じ集合に属するか否か
        boolean same(int x, int y){
            return find(x) == find(y);
        } same {
            return find(x) == find(y);
        } return find(x) == find(y); find(x) == find(y) find(x) find x find(y) find y int x x int y y public class Main {
    Scanner sc = new Scanner(System.in);
    String s;
    public void run(){
        s = sc.next();
        solve();
    }
    public void solve(){
        int ans = 0;
        if(s.substring(0, 1).equals("A")){
            int c = -1;
            for(int i = 2; i < s.length() - 1; i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            }
            if(c != -1) {
                int flag = 1;
                for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                }
                if(flag != -1) ans = 1;
            }
        }


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

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

    static class Pair {
        int first,second;
        public Pair(int a,int b) {
            this.first = a;
            this.second = b;
        }
    }
    static class Edge{
        int to, cost;
        public Edge(int a, int b){
            this.to = a;
            this.cost = b;
        }
    }
    class MyComparator implements Comparator {
        @Override
        public int compare (Object arg0, Object arg1) {
            int x = ((Pair)arg0).first;
            int y = ((Pair)arg1).first;

            if (x < y) {
                return 1;
            } else if (x > y) {
                return -1;
            } else{
                return 0;
            }
        }
    }
    static class UnionFind{
        int par[];
        int rank[];

        //n要素で初期化
        public UnionFind(int maxn){
            par = new int[maxn];
            rank = new int[maxn];

            for(int i = 0; i < maxn; i++){
                par[i] = i;
                rank[i] = 0;
            }
        }

        //木の根を求める
        int find(int x){
            if(par[x] == x){
                return x;
            }
            else {
                return par[x] = find(par[x]);
            }
        }

        // xとyの属する集合を併合
        void unite (int x, int y){
            x = find(x);
            y = find(y);
            if(x == y){
                return;
            }

            if(rank[x] < rank[y]){
                par[x] = y;
            }
            else{
                par[y] = x;
                if(rank[x] == rank[y]) rank[x]++;
            }
        }

        // xとyが同じ集合に属するか否か
        boolean same(int x, int y){
            return find(x) == find(y);
        }
    }

} public class Main {
    Scanner sc = new Scanner(System.in);
    String s;
    public void run(){
        s = sc.next();
        solve();
    }
    public void solve(){
        int ans = 0;
        if(s.substring(0, 1).equals("A")){
            int c = -1;
            for(int i = 2; i < s.length() - 1; i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            }
            if(c != -1) {
                int flag = 1;
                for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                }
                if(flag != -1) ans = 1;
            }
        }


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

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

    static class Pair {
        int first,second;
        public Pair(int a,int b) {
            this.first = a;
            this.second = b;
        }
    }
    static class Edge{
        int to, cost;
        public Edge(int a, int b){
            this.to = a;
            this.cost = b;
        }
    }
    class MyComparator implements Comparator {
        @Override
        public int compare (Object arg0, Object arg1) {
            int x = ((Pair)arg0).first;
            int y = ((Pair)arg1).first;

            if (x < y) {
                return 1;
            } else if (x > y) {
                return -1;
            } else{
                return 0;
            }
        }
    }
    static class UnionFind{
        int par[];
        int rank[];

        //n要素で初期化
        public UnionFind(int maxn){
            par = new int[maxn];
            rank = new int[maxn];

            for(int i = 0; i < maxn; i++){
                par[i] = i;
                rank[i] = 0;
            }
        }

        //木の根を求める
        int find(int x){
            if(par[x] == x){
                return x;
            }
            else {
                return par[x] = find(par[x]);
            }
        }

        // xとyの属する集合を併合
        void unite (int x, int y){
            x = find(x);
            y = find(y);
            if(x == y){
                return;
            }

            if(rank[x] < rank[y]){
                par[x] = y;
            }
            else{
                par[y] = x;
                if(rank[x] == rank[y]) rank[x]++;
            }
        }

        // xとyが同じ集合に属するか否か
        boolean same(int x, int y){
            return find(x) == find(y);
        }
    }

} Main

import java.util.Comparator;
import java.util.Scanner;


public class Main {
    Scanner sc = new Scanner(System.in);
    String s;
    public void run(){
        s = sc.next();
        solve();
    }
    public void solve(){
        int ans = 0;
        if(s.substring(0, 1).equals("A")){
            int c = -1;
            for(int i = 2; i < s.length() - 1; i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c = i;
                    break;
                }
            }
            if(c != -1) {
                int flag = 1;
                for (int i = 1; i < s.length(); i++) {
                    if (i != c) {
                        char t = s.charAt(i);
                        if (t == 'a' || t == 'b' || t == 'c' || t == 'd' || t == 'e' || t == 'f'
                                || t == 'g' || t == 'h' || t == 'i' || t == 'j' || t == 'k' || t == 'l'
                                || t == 'm' || t == 'n' || t == 'o' || t == 'p' || t == 'q' || t == 'r'
                                || t == 's' || t == 't' || t == 'u' || t == 'v' || t == 'w' || t == 'x'
                                || t == 'y' || t == 'z') {

                        } else {
                            flag = -1;
                        }
                    }
                }
                if(flag != -1) ans = 1;
            }
        }


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

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

    static class Pair {
        int first,second;
        public Pair(int a,int b) {
            this.first = a;
            this.second = b;
        }
    }
    static class Edge{
        int to, cost;
        public Edge(int a, int b){
            this.to = a;
            this.cost = b;
        }
    }
    class MyComparator implements Comparator {
        @Override
        public int compare (Object arg0, Object arg1) {
            int x = ((Pair)arg0).first;
            int y = ((Pair)arg1).first;

            if (x < y) {
                return 1;
            } else if (x > y) {
                return -1;
            } else{
                return 0;
            }
        }
    }
    static class UnionFind{
        int par[];
        int rank[];

        //n要素で初期化
        public UnionFind(int maxn){
            par = new int[maxn];
            rank = new int[maxn];

            for(int i = 0; i < maxn; i++){
                par[i] = i;
                rank[i] = 0;
            }
        }

        //木の根を求める
        int find(int x){
            if(par[x] == x){
                return x;
            }
            else {
                return par[x] = find(par[x]);
            }
        }

        // xとyの属する集合を併合
        void unite (int x, int y){
            x = find(x);
            y = find(y);
            if(x == y){
                return;
            }

            if(rank[x] < rank[y]){
                par[x] = y;
            }
            else{
                par[y] = x;
                if(rank[x] == rank[y]) rank[x]++;
            }
        }

        // xとyが同じ集合に属するか否か
        boolean same(int x, int y){
            return find(x) == find(y);
        }
    }

}