import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean flagA = false, flagC = false, flagL = true;
		int n = 0;
		if(s.charAt(0) == 'A') flagA = true;
		for(int i = 2; i < s.length() - 1; i++) {
			if(flagC && s.charAt(i) == 'C') {
				flagC = false;
				break;
			} else if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			}
		}
		for(int i = 1; i < s.length(); i++) {
			if(i != n && Character.isUpperCase(s.charAt(i))) flagL = false;
		}
		if(flagA && flagC && flagL) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean flagA = false, flagC = false, flagL = true;
		int n = 0;
		if(s.charAt(0) == 'A') flagA = true;
		for(int i = 2; i < s.length() - 1; i++) {
			if(flagC && s.charAt(i) == 'C') {
				flagC = false;
				break;
			} else if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			}
		}
		for(int i = 1; i < s.length(); i++) {
			if(i != n && Character.isUpperCase(s.charAt(i))) flagL = false;
		}
		if(flagA && flagC && flagL) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean flagA = false, flagC = false, flagL = true;
		int n = 0;
		if(s.charAt(0) == 'A') flagA = true;
		for(int i = 2; i < s.length() - 1; i++) {
			if(flagC && s.charAt(i) == 'C') {
				flagC = false;
				break;
			} else if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			}
		}
		for(int i = 1; i < s.length(); i++) {
			if(i != n && Character.isUpperCase(s.charAt(i))) flagL = false;
		}
		if(flagA && flagC && flagL) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean flagA = false, flagC = false, flagL = true;
		int n = 0;
		if(s.charAt(0) == 'A') flagA = true;
		for(int i = 2; i < s.length() - 1; i++) {
			if(flagC && s.charAt(i) == 'C') {
				flagC = false;
				break;
			} else if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			}
		}
		for(int i = 1; i < s.length(); i++) {
			if(i != n && Character.isUpperCase(s.charAt(i))) flagL = false;
		}
		if(flagA && flagC && flagL) {
			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 boolean flagA = false flagA false flagC = false flagC false flagL = true; flagL true int n = 0; n 0 if(s.charAt(0) == 'A') flagA = true; s.charAt(0) == 'A' s.charAt(0) s.charAt s 0 'A' flagA = true flagA true for(int i = 2; i < s.length() - 1; i++) {
			if(flagC && s.charAt(i) == 'C') {
				flagC = false;
				break;
			} else if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			}
		} 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(flagC && s.charAt(i) == 'C') {
				flagC = false;
				break;
			} else if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			}
		} {
			if(flagC && s.charAt(i) == 'C') {
				flagC = false;
				break;
			} else if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			}
		} if(flagC && s.charAt(i) == 'C') {
				flagC = false;
				break;
			} else if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			} flagC && s.charAt(i) == 'C' flagC s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
				flagC = false;
				break;
			} flagC = false flagC false break; if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			} s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
				flagC = true;
				n = i;
			} flagC = true flagC true n = i n i for(int i = 1; i < s.length(); i++) {
			if(i != n && Character.isUpperCase(s.charAt(i))) flagL = false;
		} int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
			if(i != n && Character.isUpperCase(s.charAt(i))) flagL = false;
		} {
			if(i != n && Character.isUpperCase(s.charAt(i))) flagL = false;
		} if(i != n && Character.isUpperCase(s.charAt(i))) flagL = false; i != n && Character.isUpperCase(s.charAt(i)) i != n i n Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i flagL = false flagL false if(flagA && flagC && flagL) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		} flagA && flagC && flagL flagA && flagC && flagL flagA flagC flagL {
			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 class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean flagA = false, flagC = false, flagL = true;
		int n = 0;
		if(s.charAt(0) == 'A') flagA = true;
		for(int i = 2; i < s.length() - 1; i++) {
			if(flagC && s.charAt(i) == 'C') {
				flagC = false;
				break;
			} else if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			}
		}
		for(int i = 1; i < s.length(); i++) {
			if(i != n && Character.isUpperCase(s.charAt(i))) flagL = false;
		}
		if(flagA && flagC && flagL) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
} public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean flagA = false, flagC = false, flagL = true;
		int n = 0;
		if(s.charAt(0) == 'A') flagA = true;
		for(int i = 2; i < s.length() - 1; i++) {
			if(flagC && s.charAt(i) == 'C') {
				flagC = false;
				break;
			} else if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			}
		}
		for(int i = 1; i < s.length(); i++) {
			if(i != n && Character.isUpperCase(s.charAt(i))) flagL = false;
		}
		if(flagA && flagC && flagL) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
} Main
import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean flagA = false, flagC = false, flagL = true;
		int n = 0;
		if(s.charAt(0) == 'A') flagA = true;
		for(int i = 2; i < s.length() - 1; i++) {
			if(flagC && s.charAt(i) == 'C') {
				flagC = false;
				break;
			} else if(s.charAt(i) == 'C') {
				flagC = true;
				n = i;
			}
		}
		for(int i = 1; i < s.length(); i++) {
			if(i != n && Character.isUpperCase(s.charAt(i))) flagL = false;
		}
		if(flagA && flagC && flagL) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
}