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