import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int count = 0;
		
		if(S.indexOf('A') == 0) {
			count++;
		}	
		
		if(S.replace("C", "").length() == (S.length() - 1)) {
			if((S.indexOf('C') >= 2) && (S.length() - S.indexOf('C') >= 2)) {
				count++;
			}
		}
		
		String SnA = S.replace("A", "");
		String SnAC = SnA.replaceAll("C", "");
		
		if(SnAC.toLowerCase() == SnAC) {
			count++;
		}
		
		if(count == 3) {
			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();
		int count = 0;
		
		if(S.indexOf('A') == 0) {
			count++;
		}	
		
		if(S.replace("C", "").length() == (S.length() - 1)) {
			if((S.indexOf('C') >= 2) && (S.length() - S.indexOf('C') >= 2)) {
				count++;
			}
		}
		
		String SnA = S.replace("A", "");
		String SnAC = SnA.replaceAll("C", "");
		
		if(SnAC.toLowerCase() == SnAC) {
			count++;
		}
		
		if(count == 3) {
			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();
		int count = 0;
		
		if(S.indexOf('A') == 0) {
			count++;
		}	
		
		if(S.replace("C", "").length() == (S.length() - 1)) {
			if((S.indexOf('C') >= 2) && (S.length() - S.indexOf('C') >= 2)) {
				count++;
			}
		}
		
		String SnA = S.replace("A", "");
		String SnAC = SnA.replaceAll("C", "");
		
		if(SnAC.toLowerCase() == SnAC) {
			count++;
		}
		
		if(count == 3) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
		
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int count = 0;
		
		if(S.indexOf('A') == 0) {
			count++;
		}	
		
		if(S.replace("C", "").length() == (S.length() - 1)) {
			if((S.indexOf('C') >= 2) && (S.length() - S.indexOf('C') >= 2)) {
				count++;
			}
		}
		
		String SnA = S.replace("A", "");
		String SnAC = SnA.replaceAll("C", "");
		
		if(SnAC.toLowerCase() == SnAC) {
			count++;
		}
		
		if(count == 3) {
			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 int count = 0; count 0 if(S.indexOf('A') == 0) {
			count++;
		} S.indexOf('A') == 0 S.indexOf('A') S.indexOf S 'A' 0 {
			count++;
		} count++ count if(S.replace("C", "").length() == (S.length() - 1)) {
			if((S.indexOf('C') >= 2) && (S.length() - S.indexOf('C') >= 2)) {
				count++;
			}
		} S.replace("C", "").length() == (S.length() - 1) S.replace("C", "").length() S.replace("C", "").length S.replace("C", "") S.replace S "C" "" (S.length() - 1) S.length() S.length S 1 {
			if((S.indexOf('C') >= 2) && (S.length() - S.indexOf('C') >= 2)) {
				count++;
			}
		} if((S.indexOf('C') >= 2) && (S.length() - S.indexOf('C') >= 2)) {
				count++;
			} (S.indexOf('C') >= 2) && (S.length() - S.indexOf('C') >= 2) (S.indexOf('C') >= 2) S.indexOf('C') S.indexOf S 'C' 2 (S.length() - S.indexOf('C') >= 2) S.length() - S.indexOf('C') S.length() S.length S S.indexOf('C') S.indexOf S 'C' 2 {
				count++;
			} count++ count String SnA = S.replace("A", ""); SnA S.replace("A", "") S.replace S "A" "" String SnAC = SnA.replaceAll("C", ""); SnAC SnA.replaceAll("C", "") SnA.replaceAll SnA "C" "" if(SnAC.toLowerCase() == SnAC) {
			count++;
		} SnAC.toLowerCase() == SnAC SnAC.toLowerCase() SnAC.toLowerCase SnAC SnAC {
			count++;
		} count++ count if(count == 3) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		} count == 3 count 3 {
			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();
		int count = 0;
		
		if(S.indexOf('A') == 0) {
			count++;
		}	
		
		if(S.replace("C", "").length() == (S.length() - 1)) {
			if((S.indexOf('C') >= 2) && (S.length() - S.indexOf('C') >= 2)) {
				count++;
			}
		}
		
		String SnA = S.replace("A", "");
		String SnAC = SnA.replaceAll("C", "");
		
		if(SnAC.toLowerCase() == SnAC) {
			count++;
		}
		
		if(count == 3) {
			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();
		int count = 0;
		
		if(S.indexOf('A') == 0) {
			count++;
		}	
		
		if(S.replace("C", "").length() == (S.length() - 1)) {
			if((S.indexOf('C') >= 2) && (S.length() - S.indexOf('C') >= 2)) {
				count++;
			}
		}
		
		String SnA = S.replace("A", "");
		String SnAC = SnA.replaceAll("C", "");
		
		if(SnAC.toLowerCase() == SnAC) {
			count++;
		}
		
		if(count == 3) {
			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();
		int count = 0;
		
		if(S.indexOf('A') == 0) {
			count++;
		}	
		
		if(S.replace("C", "").length() == (S.length() - 1)) {
			if((S.indexOf('C') >= 2) && (S.length() - S.indexOf('C') >= 2)) {
				count++;
			}
		}
		
		String SnA = S.replace("A", "");
		String SnAC = SnA.replaceAll("C", "");
		
		if(SnAC.toLowerCase() == SnAC) {
			count++;
		}
		
		if(count == 3) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
		
	}
}
