import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        char[] ch = sc.next().toCharArray();
        String ans = "AC";
        
        if (ch[0] != 'A') {
            ans = "WA";
        } else {
            int index = 0;
            for (int i = 1; i < ch.length; i++) {
                if (ch[i] == 'C') {
                    index = i;
                }
            }
            if (!(index >= 2 && index <= ch.length - 2)) ans = "WA";
            for (int i = 1; i < index; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
            for (int i = index + 1; i < ch.length; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
        }
        
        out.println(ans);
        
        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        char[] ch = sc.next().toCharArray();
        String ans = "AC";
        
        if (ch[0] != 'A') {
            ans = "WA";
        } else {
            int index = 0;
            for (int i = 1; i < ch.length; i++) {
                if (ch[i] == 'C') {
                    index = i;
                }
            }
            if (!(index >= 2 && index <= ch.length - 2)) ans = "WA";
            for (int i = 1; i < index; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
            for (int i = index + 1; i < ch.length; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
        }
        
        out.println(ans);
        
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        char[] ch = sc.next().toCharArray();
        String ans = "AC";
        
        if (ch[0] != 'A') {
            ans = "WA";
        } else {
            int index = 0;
            for (int i = 1; i < ch.length; i++) {
                if (ch[i] == 'C') {
                    index = i;
                }
            }
            if (!(index >= 2 && index <= ch.length - 2)) ans = "WA";
            for (int i = 1; i < index; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
            for (int i = index + 1; i < ch.length; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
        }
        
        out.println(ans);
        
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        char[] ch = sc.next().toCharArray();
        String ans = "AC";
        
        if (ch[0] != 'A') {
            ans = "WA";
        } else {
            int index = 0;
            for (int i = 1; i < ch.length; i++) {
                if (ch[i] == 'C') {
                    index = i;
                }
            }
            if (!(index >= 2 && index <= ch.length - 2)) ans = "WA";
            for (int i = 1; i < index; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
            for (int i = index + 1; i < ch.length; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
        }
        
        out.println(ans);
        
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) char[] ch = sc.next().toCharArray(); ch sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc String ans = "AC"; ans "AC" if (ch[0] != 'A') {
            ans = "WA";
        } else {
            int index = 0;
            for (int i = 1; i < ch.length; i++) {
                if (ch[i] == 'C') {
                    index = i;
                }
            }
            if (!(index >= 2 && index <= ch.length - 2)) ans = "WA";
            for (int i = 1; i < index; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
            for (int i = index + 1; i < ch.length; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
        } ch[0] != 'A' ch[0] ch 0 'A' {
            ans = "WA";
        } ans = "WA" ans "WA" {
            int index = 0;
            for (int i = 1; i < ch.length; i++) {
                if (ch[i] == 'C') {
                    index = i;
                }
            }
            if (!(index >= 2 && index <= ch.length - 2)) ans = "WA";
            for (int i = 1; i < index; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
            for (int i = index + 1; i < ch.length; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
        } int index = 0; index 0 for (int i = 1; i < ch.length; i++) {
                if (ch[i] == 'C') {
                    index = i;
                }
            } int i = 1; int i = 1; i 1 i < ch.length i ch.length ch ch.length i++ i++ i {
                if (ch[i] == 'C') {
                    index = i;
                }
            } {
                if (ch[i] == 'C') {
                    index = i;
                }
            } if (ch[i] == 'C') {
                    index = i;
                } ch[i] == 'C' ch[i] ch i 'C' {
                    index = i;
                } index = i index i if (!(index >= 2 && index <= ch.length - 2)) ans = "WA"; !(index >= 2 && index <= ch.length - 2) (index >= 2 && index <= ch.length - 2) index >= 2 index 2 index <= ch.length - 2 index ch.length - 2 ch.length ch ch.length 2 ans = "WA" ans "WA" for (int i = 1; i < index; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            } int i = 1; int i = 1; i 1 i < index i index i++ i++ i {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            } {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            } if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA"; !(ch[i] >= 97 && ch[i] <= 122) (ch[i] >= 97 && ch[i] <= 122) ch[i] >= 97 ch[i] ch i 97 ch[i] <= 122 ch[i] ch i 122 ans = "WA" ans "WA" for (int i = index + 1; i < ch.length; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            } int i = index + 1; int i = index + 1; i index + 1 index 1 i < ch.length i ch.length ch ch.length i++ i++ i {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            } {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            } if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA"; !(ch[i] >= 97 && ch[i] <= 122) (ch[i] >= 97 && ch[i] <= 122) ch[i] >= 97 ch[i] ch i 97 ch[i] <= 122 ch[i] ch i 122 ans = "WA" ans "WA" out.println(ans) out.println out ans out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        char[] ch = sc.next().toCharArray();
        String ans = "AC";
        
        if (ch[0] != 'A') {
            ans = "WA";
        } else {
            int index = 0;
            for (int i = 1; i < ch.length; i++) {
                if (ch[i] == 'C') {
                    index = i;
                }
            }
            if (!(index >= 2 && index <= ch.length - 2)) ans = "WA";
            for (int i = 1; i < index; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
            for (int i = index + 1; i < ch.length; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
        }
        
        out.println(ans);
        
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        char[] ch = sc.next().toCharArray();
        String ans = "AC";
        
        if (ch[0] != 'A') {
            ans = "WA";
        } else {
            int index = 0;
            for (int i = 1; i < ch.length; i++) {
                if (ch[i] == 'C') {
                    index = i;
                }
            }
            if (!(index >= 2 && index <= ch.length - 2)) ans = "WA";
            for (int i = 1; i < index; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
            for (int i = index + 1; i < ch.length; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
        }
        
        out.println(ans);
        
        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        char[] ch = sc.next().toCharArray();
        String ans = "AC";
        
        if (ch[0] != 'A') {
            ans = "WA";
        } else {
            int index = 0;
            for (int i = 1; i < ch.length; i++) {
                if (ch[i] == 'C') {
                    index = i;
                }
            }
            if (!(index >= 2 && index <= ch.length - 2)) ans = "WA";
            for (int i = 1; i < index; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
            for (int i = index + 1; i < ch.length; i++) {
                if (!(ch[i] >= 97 && ch[i] <= 122)) ans = "WA";
            }
        }
        
        out.println(ans);
        
        out.flush();
    }
}