import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	}
	public static boolean check(String s) {
		if(s.charAt(0)!='A') {
			return false;
		}
		int c = 0;
		for(int i = 2; i <s.length()-1; i++) {
			if(s.charAt(i)=='C') {
				c++;
			}
		}
		if(c!=1) {
			return false;
		}
		int upper = 0;
		for(int i = 0; i < s.length(); i++) {
			if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
				upper++;
			}
		}
		if(upper!=2) {
			return false;
		}
		return true;
	}
} 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();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	}
	public static boolean check(String s) {
		if(s.charAt(0)!='A') {
			return false;
		}
		int c = 0;
		for(int i = 2; i <s.length()-1; i++) {
			if(s.charAt(i)=='C') {
				c++;
			}
		}
		if(c!=1) {
			return false;
		}
		int upper = 0;
		for(int i = 0; i < s.length(); i++) {
			if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
				upper++;
			}
		}
		if(upper!=2) {
			return false;
		}
		return true;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		} check(s) check s {
			System.out.println("AC");
		} System.out.println("AC") System.out.println System.out System System.out "AC" {
			System.out.println("WA");
		} System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public static boolean check(String s) {
		if(s.charAt(0)!='A') {
			return false;
		}
		int c = 0;
		for(int i = 2; i <s.length()-1; i++) {
			if(s.charAt(i)=='C') {
				c++;
			}
		}
		if(c!=1) {
			return false;
		}
		int upper = 0;
		for(int i = 0; i < s.length(); i++) {
			if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
				upper++;
			}
		}
		if(upper!=2) {
			return false;
		}
		return true;
	} check {
		if(s.charAt(0)!='A') {
			return false;
		}
		int c = 0;
		for(int i = 2; i <s.length()-1; i++) {
			if(s.charAt(i)=='C') {
				c++;
			}
		}
		if(c!=1) {
			return false;
		}
		int upper = 0;
		for(int i = 0; i < s.length(); i++) {
			if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
				upper++;
			}
		}
		if(upper!=2) {
			return false;
		}
		return true;
	} if(s.charAt(0)!='A') {
			return false;
		} s.charAt(0)!='A' s.charAt(0) s.charAt s 0 'A' {
			return false;
		} return false; false int c = 0; c 0 for(int i = 2; i <s.length()-1; i++) {
			if(s.charAt(i)=='C') {
				c++;
			}
		} 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.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++ c if(c!=1) {
			return false;
		} c!=1 c 1 {
			return false;
		} return false; false int upper = 0; upper 0 for(int i = 0; i < s.length(); i++) {
			if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
				upper++;
			}
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
				upper++;
			}
		} {
			if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
				upper++;
			}
		} if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
				upper++;
			} s.charAt(i)>='A'&&s.charAt(i)<='Z' s.charAt(i)>='A' s.charAt(i) s.charAt s i 'A' s.charAt(i)<='Z' s.charAt(i) s.charAt s i 'Z' {
				upper++;
			} upper++ upper if(upper!=2) {
			return false;
		} upper!=2 upper 2 {
			return false;
		} return false; false return true; true String s s public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	}
	public static boolean check(String s) {
		if(s.charAt(0)!='A') {
			return false;
		}
		int c = 0;
		for(int i = 2; i <s.length()-1; i++) {
			if(s.charAt(i)=='C') {
				c++;
			}
		}
		if(c!=1) {
			return false;
		}
		int upper = 0;
		for(int i = 0; i < s.length(); i++) {
			if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
				upper++;
			}
		}
		if(upper!=2) {
			return false;
		}
		return true;
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	}
	public static boolean check(String s) {
		if(s.charAt(0)!='A') {
			return false;
		}
		int c = 0;
		for(int i = 2; i <s.length()-1; i++) {
			if(s.charAt(i)=='C') {
				c++;
			}
		}
		if(c!=1) {
			return false;
		}
		int upper = 0;
		for(int i = 0; i < s.length(); i++) {
			if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
				upper++;
			}
		}
		if(upper!=2) {
			return false;
		}
		return true;
	}
} Main
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(check(s)) {
			System.out.println("AC");
		}
		else {
			System.out.println("WA");
		}
	}
	public static boolean check(String s) {
		if(s.charAt(0)!='A') {
			return false;
		}
		int c = 0;
		for(int i = 2; i <s.length()-1; i++) {
			if(s.charAt(i)=='C') {
				c++;
			}
		}
		if(c!=1) {
			return false;
		}
		int upper = 0;
		for(int i = 0; i < s.length(); i++) {
			if(s.charAt(i)>='A'&&s.charAt(i)<='Z') {
				upper++;
			}
		}
		if(upper!=2) {
			return false;
		}
		return true;
	}
}
