

import java.util.Arrays;
import java.util.Scanner;

public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        String s=gs();

        if(!s.substring(0,1).equals("A")) {
        	System.out.println("WA");
        	return;
        }
        
        if(!s.substring(2, s.length()-1).contains("C")) {
        	System.out.println("WA");
        	return;
        }
        
        if (s.length() - s.replace("C", "").length() !=1) {
        	System.out.println("WA");
        	return;
        }

        int c=0;
        for (int i=0; i<s.length(); i++) {
        	if(Character.isUpperCase( s.charAt( i ) )) {
        		c++;
        	}
        }
        //System.out.println("No");
        

	    if (c==2) {
	    	System.out.print("AC");
	    }else {
	    	System.out.print("WA");
	    }



	}
	
	public static int s(int n) {
		String S=String.valueOf(n);
		int c=0;
		for (int i=0; i<S.length();i++) {
			int k=Integer.parseInt(S.substring(i, i+1));
			c+=k;
		}
		return c;
	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        String s=gs();

        if(!s.substring(0,1).equals("A")) {
        	System.out.println("WA");
        	return;
        }
        
        if(!s.substring(2, s.length()-1).contains("C")) {
        	System.out.println("WA");
        	return;
        }
        
        if (s.length() - s.replace("C", "").length() !=1) {
        	System.out.println("WA");
        	return;
        }

        int c=0;
        for (int i=0; i<s.length(); i++) {
        	if(Character.isUpperCase( s.charAt( i ) )) {
        		c++;
        	}
        }
        //System.out.println("No");
        

	    if (c==2) {
	    	System.out.print("AC");
	    }else {
	    	System.out.print("WA");
	    }



	}
	
	public static int s(int n) {
		String S=String.valueOf(n);
		int c=0;
		for (int i=0; i<S.length();i++) {
			int k=Integer.parseInt(S.substring(i, i+1));
			c+=k;
		}
		return c;
	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} Main static Scanner scanner; scanner public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        String s=gs();

        if(!s.substring(0,1).equals("A")) {
        	System.out.println("WA");
        	return;
        }
        
        if(!s.substring(2, s.length()-1).contains("C")) {
        	System.out.println("WA");
        	return;
        }
        
        if (s.length() - s.replace("C", "").length() !=1) {
        	System.out.println("WA");
        	return;
        }

        int c=0;
        for (int i=0; i<s.length(); i++) {
        	if(Character.isUpperCase( s.charAt( i ) )) {
        		c++;
        	}
        }
        //System.out.println("No");
        

	    if (c==2) {
	    	System.out.print("AC");
	    }else {
	    	System.out.print("WA");
	    }



	} main {
	    scanner = new Scanner(System.in);

        String s=gs();

        if(!s.substring(0,1).equals("A")) {
        	System.out.println("WA");
        	return;
        }
        
        if(!s.substring(2, s.length()-1).contains("C")) {
        	System.out.println("WA");
        	return;
        }
        
        if (s.length() - s.replace("C", "").length() !=1) {
        	System.out.println("WA");
        	return;
        }

        int c=0;
        for (int i=0; i<s.length(); i++) {
        	if(Character.isUpperCase( s.charAt( i ) )) {
        		c++;
        	}
        }
        //System.out.println("No");
        

	    if (c==2) {
	    	System.out.print("AC");
	    }else {
	    	System.out.print("WA");
	    }



	} scanner = new Scanner(System.in) scanner new Scanner(System.in) String s=gs(); s gs() gs if(!s.substring(0,1).equals("A")) {
        	System.out.println("WA");
        	return;
        } !s.substring(0,1).equals("A") s.substring(0,1).equals("A") s.substring(0,1).equals s.substring(0,1) s.substring s 0 1 "A" {
        	System.out.println("WA");
        	return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; if(!s.substring(2, s.length()-1).contains("C")) {
        	System.out.println("WA");
        	return;
        } !s.substring(2, s.length()-1).contains("C") s.substring(2, s.length()-1).contains("C") s.substring(2, s.length()-1).contains s.substring(2, s.length()-1) s.substring s 2 s.length()-1 s.length() s.length s 1 "C" {
        	System.out.println("WA");
        	return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; if (s.length() - s.replace("C", "").length() !=1) {
        	System.out.println("WA");
        	return;
        } s.length() - s.replace("C", "").length() !=1 s.length() - s.replace("C", "").length() s.length() s.length s s.replace("C", "").length() s.replace("C", "").length s.replace("C", "") s.replace s "C" "" 1 {
        	System.out.println("WA");
        	return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; int c=0; c 0 for (int i=0; i<s.length(); i++) {
        	if(Character.isUpperCase( s.charAt( i ) )) {
        		c++;
        	}
        } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
        	if(Character.isUpperCase( s.charAt( i ) )) {
        		c++;
        	}
        } {
        	if(Character.isUpperCase( s.charAt( i ) )) {
        		c++;
        	}
        } if(Character.isUpperCase( s.charAt( i ) )) {
        		c++;
        	} Character.isUpperCase( s.charAt( i ) ) Character.isUpperCase Character s.charAt( i ) s.charAt s i {
        		c++;
        	} c++ c if (c==2) {
	    	System.out.print("AC");
	    }else {
	    	System.out.print("WA");
	    } c==2 c 2 {
	    	System.out.print("AC");
	    } System.out.print("AC") System.out.print System.out System System.out "AC" {
	    	System.out.print("WA");
	    } System.out.print("WA") System.out.print System.out System System.out "WA" String[] args args public static int s(int n) {
		String S=String.valueOf(n);
		int c=0;
		for (int i=0; i<S.length();i++) {
			int k=Integer.parseInt(S.substring(i, i+1));
			c+=k;
		}
		return c;
	} s {
		String S=String.valueOf(n);
		int c=0;
		for (int i=0; i<S.length();i++) {
			int k=Integer.parseInt(S.substring(i, i+1));
			c+=k;
		}
		return c;
	} String S=String.valueOf(n); S String.valueOf(n) String.valueOf String n int c=0; c 0 for (int i=0; i<S.length();i++) {
			int k=Integer.parseInt(S.substring(i, i+1));
			c+=k;
		} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			int k=Integer.parseInt(S.substring(i, i+1));
			c+=k;
		} {
			int k=Integer.parseInt(S.substring(i, i+1));
			c+=k;
		} int k=Integer.parseInt(S.substring(i, i+1)); k Integer.parseInt(S.substring(i, i+1)) Integer.parseInt Integer S.substring(i, i+1) S.substring S i i+1 i 1 c+=k c k return c; c int n n public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	} d {
		String a=String.valueOf(n);
		return (long)a.length();
	} String a=String.valueOf(n); a String.valueOf(n) String.valueOf String n return (long)a.length(); (long)a.length() a.length a long n n // 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	} gs {
		return scanner.next();
	} return scanner.next(); scanner.next() scanner.next scanner // intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	} gi {
		return Integer.parseInt(scanner.next());
	} return Integer.parseInt(scanner.next()); Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner // longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	} gl {
		return Long.parseLong(scanner.next());
	} return Long.parseLong(scanner.next()); Long.parseLong(scanner.next()) Long.parseLong Long scanner.next() scanner.next scanner // doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	} gd {
		return Double.parseDouble(scanner.next());
	} return Double.parseDouble(scanner.next()); Double.parseDouble(scanner.next()) Double.parseDouble Double scanner.next() scanner.next scanner public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        String s=gs();

        if(!s.substring(0,1).equals("A")) {
        	System.out.println("WA");
        	return;
        }
        
        if(!s.substring(2, s.length()-1).contains("C")) {
        	System.out.println("WA");
        	return;
        }
        
        if (s.length() - s.replace("C", "").length() !=1) {
        	System.out.println("WA");
        	return;
        }

        int c=0;
        for (int i=0; i<s.length(); i++) {
        	if(Character.isUpperCase( s.charAt( i ) )) {
        		c++;
        	}
        }
        //System.out.println("No");
        

	    if (c==2) {
	    	System.out.print("AC");
	    }else {
	    	System.out.print("WA");
	    }



	}
	
	public static int s(int n) {
		String S=String.valueOf(n);
		int c=0;
		for (int i=0; i<S.length();i++) {
			int k=Integer.parseInt(S.substring(i, i+1));
			c+=k;
		}
		return c;
	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        String s=gs();

        if(!s.substring(0,1).equals("A")) {
        	System.out.println("WA");
        	return;
        }
        
        if(!s.substring(2, s.length()-1).contains("C")) {
        	System.out.println("WA");
        	return;
        }
        
        if (s.length() - s.replace("C", "").length() !=1) {
        	System.out.println("WA");
        	return;
        }

        int c=0;
        for (int i=0; i<s.length(); i++) {
        	if(Character.isUpperCase( s.charAt( i ) )) {
        		c++;
        	}
        }
        //System.out.println("No");
        

	    if (c==2) {
	    	System.out.print("AC");
	    }else {
	    	System.out.print("WA");
	    }



	}
	
	public static int s(int n) {
		String S=String.valueOf(n);
		int c=0;
		for (int i=0; i<S.length();i++) {
			int k=Integer.parseInt(S.substring(i, i+1));
			c+=k;
		}
		return c;
	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} Main


import java.util.Arrays;
import java.util.Scanner;

public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        String s=gs();

        if(!s.substring(0,1).equals("A")) {
        	System.out.println("WA");
        	return;
        }
        
        if(!s.substring(2, s.length()-1).contains("C")) {
        	System.out.println("WA");
        	return;
        }
        
        if (s.length() - s.replace("C", "").length() !=1) {
        	System.out.println("WA");
        	return;
        }

        int c=0;
        for (int i=0; i<s.length(); i++) {
        	if(Character.isUpperCase( s.charAt( i ) )) {
        		c++;
        	}
        }
        //System.out.println("No");
        

	    if (c==2) {
	    	System.out.print("AC");
	    }else {
	    	System.out.print("WA");
	    }



	}
	
	public static int s(int n) {
		String S=String.valueOf(n);
		int c=0;
		for (int i=0; i<S.length();i++) {
			int k=Integer.parseInt(S.substring(i, i+1));
			c+=k;
		}
		return c;
	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
}