import java.util.*;

class Main{

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		String S =sc.next();
		String ans = "AC";
		int cnt = 0;

		if(S.charAt(0) != 'A') ans = "WA";

		for(int i = 1; i < S.length(); i++){
			if(S.charAt(i) < 'a'){
				if(i == 1 || i == S.length() -1){
					ans = "WA";
				} else if(S.charAt(i) == 'C'){
				}
				cnt++;
			}
		}
		if(cnt != 1) ans = "WA";
		
		
			System.out.println(ans);

	}

} import java.util.*; util.* java class Main{

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		String S =sc.next();
		String ans = "AC";
		int cnt = 0;

		if(S.charAt(0) != 'A') ans = "WA";

		for(int i = 1; i < S.length(); i++){
			if(S.charAt(i) < 'a'){
				if(i == 1 || i == S.length() -1){
					ans = "WA";
				} else if(S.charAt(i) == 'C'){
				}
				cnt++;
			}
		}
		if(cnt != 1) ans = "WA";
		
		
			System.out.println(ans);

	}

} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		String S =sc.next();
		String ans = "AC";
		int cnt = 0;

		if(S.charAt(0) != 'A') ans = "WA";

		for(int i = 1; i < S.length(); i++){
			if(S.charAt(i) < 'a'){
				if(i == 1 || i == S.length() -1){
					ans = "WA";
				} else if(S.charAt(i) == 'C'){
				}
				cnt++;
			}
		}
		if(cnt != 1) ans = "WA";
		
		
			System.out.println(ans);

	} main {
		Scanner sc = new Scanner(System.in);

		String S =sc.next();
		String ans = "AC";
		int cnt = 0;

		if(S.charAt(0) != 'A') ans = "WA";

		for(int i = 1; i < S.length(); i++){
			if(S.charAt(i) < 'a'){
				if(i == 1 || i == S.length() -1){
					ans = "WA";
				} else if(S.charAt(i) == 'C'){
				}
				cnt++;
			}
		}
		if(cnt != 1) ans = "WA";
		
		
			System.out.println(ans);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S =sc.next(); S sc.next() sc.next sc String ans = "AC"; ans "AC" int cnt = 0; cnt 0 if(S.charAt(0) != 'A') ans = "WA"; S.charAt(0) != 'A' S.charAt(0) S.charAt S 0 'A' ans = "WA" ans "WA" for(int i = 1; i < S.length(); i++){
			if(S.charAt(i) < 'a'){
				if(i == 1 || i == S.length() -1){
					ans = "WA";
				} else if(S.charAt(i) == 'C'){
				}
				cnt++;
			}
		} int i = 1; int i = 1; i 1 i < S.length() i S.length() S.length S i++ i++ i {
			if(S.charAt(i) < 'a'){
				if(i == 1 || i == S.length() -1){
					ans = "WA";
				} else if(S.charAt(i) == 'C'){
				}
				cnt++;
			}
		} {
			if(S.charAt(i) < 'a'){
				if(i == 1 || i == S.length() -1){
					ans = "WA";
				} else if(S.charAt(i) == 'C'){
				}
				cnt++;
			}
		} if(S.charAt(i) < 'a'){
				if(i == 1 || i == S.length() -1){
					ans = "WA";
				} else if(S.charAt(i) == 'C'){
				}
				cnt++;
			} S.charAt(i) < 'a' S.charAt(i) S.charAt S i 'a' {
				if(i == 1 || i == S.length() -1){
					ans = "WA";
				} else if(S.charAt(i) == 'C'){
				}
				cnt++;
			} if(i == 1 || i == S.length() -1){
					ans = "WA";
				} else if(S.charAt(i) == 'C'){
				} i == 1 || i == S.length() -1 i == 1 i 1 i == S.length() -1 i S.length() -1 S.length() S.length S 1 {
					ans = "WA";
				} ans = "WA" ans "WA" if(S.charAt(i) == 'C'){
				} S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
				} cnt++ cnt if(cnt != 1) ans = "WA"; cnt != 1 cnt 1 ans = "WA" ans "WA" System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main{

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		String S =sc.next();
		String ans = "AC";
		int cnt = 0;

		if(S.charAt(0) != 'A') ans = "WA";

		for(int i = 1; i < S.length(); i++){
			if(S.charAt(i) < 'a'){
				if(i == 1 || i == S.length() -1){
					ans = "WA";
				} else if(S.charAt(i) == 'C'){
				}
				cnt++;
			}
		}
		if(cnt != 1) ans = "WA";
		
		
			System.out.println(ans);

	}

}