//2019/3/14
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();

		boolean flag = false;

		//最初の文字をチェック
		if(S.charAt(0) != 'A') {

			flag = true;

		}else {

			int C = 0;

			for(int i=2;i<=S.length()-2;i++) {

				if(S.charAt(i) == 'C') C++;

			}

			if(C!=1) flag = true;

			char a = 0;

			for(int i=0;i<S.length();i++) {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			}
		}

		if(flag) System.out.println("WA");

		else System.out.println("AC");
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();

		boolean flag = false;

		//最初の文字をチェック
		if(S.charAt(0) != 'A') {

			flag = true;

		}else {

			int C = 0;

			for(int i=2;i<=S.length()-2;i++) {

				if(S.charAt(i) == 'C') C++;

			}

			if(C!=1) flag = true;

			char a = 0;

			for(int i=0;i<S.length();i++) {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			}
		}

		if(flag) System.out.println("WA");

		else System.out.println("AC");
	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();

		boolean flag = false;

		//最初の文字をチェック
		if(S.charAt(0) != 'A') {

			flag = true;

		}else {

			int C = 0;

			for(int i=2;i<=S.length()-2;i++) {

				if(S.charAt(i) == 'C') C++;

			}

			if(C!=1) flag = true;

			char a = 0;

			for(int i=0;i<S.length();i++) {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			}
		}

		if(flag) System.out.println("WA");

		else System.out.println("AC");
	} main {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();

		boolean flag = false;

		//最初の文字をチェック
		if(S.charAt(0) != 'A') {

			flag = true;

		}else {

			int C = 0;

			for(int i=2;i<=S.length()-2;i++) {

				if(S.charAt(i) == 'C') C++;

			}

			if(C!=1) flag = true;

			char a = 0;

			for(int i=0;i<S.length();i++) {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			}
		}

		if(flag) System.out.println("WA");

		else System.out.println("AC");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc boolean flag = false; flag false if(S.charAt(0) != 'A') {

			flag = true;

		}else {

			int C = 0;

			for(int i=2;i<=S.length()-2;i++) {

				if(S.charAt(i) == 'C') C++;

			}

			if(C!=1) flag = true;

			char a = 0;

			for(int i=0;i<S.length();i++) {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			}
		} S.charAt(0) != 'A' S.charAt(0) S.charAt S 0 'A' {

			flag = true;

		} flag = true flag true {

			int C = 0;

			for(int i=2;i<=S.length()-2;i++) {

				if(S.charAt(i) == 'C') C++;

			}

			if(C!=1) flag = true;

			char a = 0;

			for(int i=0;i<S.length();i++) {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			}
		} int C = 0; C 0 for(int i=2;i<=S.length()-2;i++) {

				if(S.charAt(i) == 'C') C++;

			} int i=2; int i=2; i 2 i<=S.length()-2 i S.length()-2 S.length() S.length S 2 i++ i++ i {

				if(S.charAt(i) == 'C') C++;

			} {

				if(S.charAt(i) == 'C') C++;

			} if(S.charAt(i) == 'C') C++; S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' C++ C if(C!=1) flag = true; C!=1 C 1 flag = true flag true char a = 0; a 0 for(int i=0;i<S.length();i++) {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			} {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			} a = S.charAt(i) a S.charAt(i) S.charAt S i if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true; !(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122) (a=='A' || a=='C' || ((int)a>=97) && (int)a<=122) a=='A' || a=='C' || ((int)a>=97) && (int)a<=122 a=='A' a 'A' a=='C' a 'C' ((int)a>=97) && (int)a<=122 ((int)a>=97) (int)a 97 (int)a<=122 (int)a 122 flag = true flag true if(flag) System.out.println("WA");

		else System.out.println("AC"); flag System.out.println("WA") System.out.println System.out System System.out "WA" System.out.println("AC") System.out.println System.out System System.out "AC" String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();

		boolean flag = false;

		//最初の文字をチェック
		if(S.charAt(0) != 'A') {

			flag = true;

		}else {

			int C = 0;

			for(int i=2;i<=S.length()-2;i++) {

				if(S.charAt(i) == 'C') C++;

			}

			if(C!=1) flag = true;

			char a = 0;

			for(int i=0;i<S.length();i++) {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			}
		}

		if(flag) System.out.println("WA");

		else System.out.println("AC");
	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();

		boolean flag = false;

		//最初の文字をチェック
		if(S.charAt(0) != 'A') {

			flag = true;

		}else {

			int C = 0;

			for(int i=2;i<=S.length()-2;i++) {

				if(S.charAt(i) == 'C') C++;

			}

			if(C!=1) flag = true;

			char a = 0;

			for(int i=0;i<S.length();i++) {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			}
		}

		if(flag) System.out.println("WA");

		else System.out.println("AC");
	}

} Main
//2019/3/14
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();

		boolean flag = false;

		//最初の文字をチェック
		if(S.charAt(0) != 'A') {

			flag = true;

		}else {

			int C = 0;

			for(int i=2;i<=S.length()-2;i++) {

				if(S.charAt(i) == 'C') C++;

			}

			if(C!=1) flag = true;

			char a = 0;

			for(int i=0;i<S.length();i++) {

				a = S.charAt(i);

				if(!(a=='A' || a=='C' || ((int)a>=97) && (int)a<=122)) flag = true;
			}
		}

		if(flag) System.out.println("WA");

		else System.out.println("AC");
	}

}
