import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) {
    	FastScanner sc = new FastScanner(System.in);
    	String str = sc.nextToken();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    }
}

class FastScanner {
    BufferedReader br;
    StringTokenizer st;
    boolean hasNext;

    public FastScanner(InputStream is) {
        br = new BufferedReader(new InputStreamReader(is));
        hasNext = true;
    }

    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                hasNext = false;
                return "##";
            }
        }
        return st.nextToken();
    }

    String next = null;
    public boolean hasNext(){
        next = nextToken();
        return hasNext;
    }

    public int nextInt() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Integer.parseInt(more);
    }

    public long nextLong() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Long.parseLong(more);
    }

    public double nextDouble() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Double.parseDouble(more);
    }

    public String nextString(){
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more;
    }

    public char nextChar(){
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more.charAt(0);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.FileNotFoundException; FileNotFoundException java.io import java.io.FileReader; FileReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static void main(String[] args) {
    	FastScanner sc = new FastScanner(System.in);
    	String str = sc.nextToken();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    }
} Main public static void main(String[] args) {
    	FastScanner sc = new FastScanner(System.in);
    	String str = sc.nextToken();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    } main {
    	FastScanner sc = new FastScanner(System.in);
    	String str = sc.nextToken();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    } FastScanner sc = new FastScanner(System.in); sc new FastScanner(System.in) String str = sc.nextToken(); str sc.nextToken() sc.nextToken sc char[] s = str.toCharArray(); s str.toCharArray() str.toCharArray str boolean flag = true flag true existC = false; existC false if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false; s.length < 4 || s.length > 10 || s[0] != 'A' s.length < 4 || s.length > 10 || s[0] != 'A' s.length < 4 s.length s s.length 4 s.length > 10 s.length s s.length 10 s[0] != 'A' s[0] s 0 'A' flag = false flag false for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	} int i = 1; int i = 1; i 1 i < s.length && flag i < s.length i s.length s s.length flag ++i ++i i {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	} {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	} if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			} s[i] <= 'z' && s[i] >= 'a' s[i] <= 'z' s[i] s i 'z' s[i] >= 'a' s[i] s i 'a' continue; if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			} s[i] == 'C' s[i] s i 'C' {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false; !existC && i > 1 && i < s.length-1 !existC && i > 1 && i < s.length-1 !existC existC i > 1 i 1 i < s.length-1 i s.length-1 s.length s s.length 1 existC = true existC true flag = false flag false {
				flag = false;
			} flag = false flag false if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA"); flag && existC flag existC 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" String[] args args class FastScanner {
    BufferedReader br;
    StringTokenizer st;
    boolean hasNext;

    public FastScanner(InputStream is) {
        br = new BufferedReader(new InputStreamReader(is));
        hasNext = true;
    }

    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                hasNext = false;
                return "##";
            }
        }
        return st.nextToken();
    }

    String next = null;
    public boolean hasNext(){
        next = nextToken();
        return hasNext;
    }

    public int nextInt() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Integer.parseInt(more);
    }

    public long nextLong() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Long.parseLong(more);
    }

    public double nextDouble() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Double.parseDouble(more);
    }

    public String nextString(){
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more;
    }

    public char nextChar(){
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more.charAt(0);
    }
} FastScanner BufferedReader br; br StringTokenizer st; st boolean hasNext; hasNext String next = null; next null public FastScanner(InputStream is) {
        br = new BufferedReader(new InputStreamReader(is));
        hasNext = true;
    } FastScanner {
        br = new BufferedReader(new InputStreamReader(is));
        hasNext = true;
    } br = new BufferedReader(new InputStreamReader(is)) br new BufferedReader(new InputStreamReader(is)) hasNext = true hasNext true InputStream is is public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                hasNext = false;
                return "##";
            }
        }
        return st.nextToken();
    } nextToken {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                hasNext = false;
                return "##";
            }
        }
        return st.nextToken();
    } while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                hasNext = false;
                return "##";
            }
        } st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                hasNext = false;
                return "##";
            }
        } try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                hasNext = false;
                return "##";
            } catch (Exception e) {
                hasNext = false;
                return "##";
            } Exception e {
                hasNext = false;
                return "##";
            } hasNext = false hasNext false return "##"; "##" {
                st = new StringTokenizer(br.readLine());
            } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public boolean hasNext(){
        next = nextToken();
        return hasNext;
    } hasNext {
        next = nextToken();
        return hasNext;
    } next = nextToken() next nextToken() nextToken return hasNext; hasNext public int nextInt() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Integer.parseInt(more);
    } nextInt {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Integer.parseInt(more);
    } if (next == null){
            hasNext();
        } next == null next null {
            hasNext();
        } hasNext() hasNext String more = next; more next next = null next null return Integer.parseInt(more); Integer.parseInt(more) Integer.parseInt Integer more public long nextLong() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Long.parseLong(more);
    } nextLong {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Long.parseLong(more);
    } if (next == null){
            hasNext();
        } next == null next null {
            hasNext();
        } hasNext() hasNext String more = next; more next next = null next null return Long.parseLong(more); Long.parseLong(more) Long.parseLong Long more public double nextDouble() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Double.parseDouble(more);
    } nextDouble {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Double.parseDouble(more);
    } if (next == null){
            hasNext();
        } next == null next null {
            hasNext();
        } hasNext() hasNext String more = next; more next next = null next null return Double.parseDouble(more); Double.parseDouble(more) Double.parseDouble Double more public String nextString(){
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more;
    } nextString {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more;
    } if (next == null){
            hasNext();
        } next == null next null {
            hasNext();
        } hasNext() hasNext String more = next; more next next = null next null return more; more public char nextChar(){
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more.charAt(0);
    } nextChar {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more.charAt(0);
    } if (next == null){
            hasNext();
        } next == null next null {
            hasNext();
        } hasNext() hasNext String more = next; more next next = null next null return more.charAt(0); more.charAt(0) more.charAt more 0 public class Main {
    public static void main(String[] args) {
    	FastScanner sc = new FastScanner(System.in);
    	String str = sc.nextToken();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    }
} public class Main {
    public static void main(String[] args) {
    	FastScanner sc = new FastScanner(System.in);
    	String str = sc.nextToken();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    }
} Main
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) {
    	FastScanner sc = new FastScanner(System.in);
    	String str = sc.nextToken();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    }
}

class FastScanner {
    BufferedReader br;
    StringTokenizer st;
    boolean hasNext;

    public FastScanner(InputStream is) {
        br = new BufferedReader(new InputStreamReader(is));
        hasNext = true;
    }

    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                hasNext = false;
                return "##";
            }
        }
        return st.nextToken();
    }

    String next = null;
    public boolean hasNext(){
        next = nextToken();
        return hasNext;
    }

    public int nextInt() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Integer.parseInt(more);
    }

    public long nextLong() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Long.parseLong(more);
    }

    public double nextDouble() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Double.parseDouble(more);
    }

    public String nextString(){
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more;
    }

    public char nextChar(){
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more.charAt(0);
    }
}