import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Deque;
import java.util.Scanner;

public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		boolean ans = true;
		
		if(!(S.charAt(0) == 'A')) ans = false;
		
		String SS = S.substring(2, S.length()-1);
		int count = 0;
		for(int i = 0; i < SS.length(); i++){
			if(SS.charAt(i) == 'C') count++;
		}
		if(!(count == 1)) ans = false;
		
		count = 0;
		for(int i = 0; i < S.length(); i++){
			if(S.charAt(i) == 'A') continue;
			if(S.charAt(i) == 'C') continue;
			if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') continue;
			ans = false;
		}
		
		System.out.println(ans?"AC":"WA");
	}
} import java.io.File; File java.io import java.io.IOException; IOException java.io import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Deque; Deque java.util import java.util.Scanner; Scanner java.util public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		boolean ans = true;
		
		if(!(S.charAt(0) == 'A')) ans = false;
		
		String SS = S.substring(2, S.length()-1);
		int count = 0;
		for(int i = 0; i < SS.length(); i++){
			if(SS.charAt(i) == 'C') count++;
		}
		if(!(count == 1)) ans = false;
		
		count = 0;
		for(int i = 0; i < S.length(); i++){
			if(S.charAt(i) == 'A') continue;
			if(S.charAt(i) == 'C') continue;
			if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') continue;
			ans = false;
		}
		
		System.out.println(ans?"AC":"WA");
	}
} Main public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		boolean ans = true;
		
		if(!(S.charAt(0) == 'A')) ans = false;
		
		String SS = S.substring(2, S.length()-1);
		int count = 0;
		for(int i = 0; i < SS.length(); i++){
			if(SS.charAt(i) == 'C') count++;
		}
		if(!(count == 1)) ans = false;
		
		count = 0;
		for(int i = 0; i < S.length(); i++){
			if(S.charAt(i) == 'A') continue;
			if(S.charAt(i) == 'C') continue;
			if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') continue;
			ans = false;
		}
		
		System.out.println(ans?"AC":"WA");
	} main {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		boolean ans = true;
		
		if(!(S.charAt(0) == 'A')) ans = false;
		
		String SS = S.substring(2, S.length()-1);
		int count = 0;
		for(int i = 0; i < SS.length(); i++){
			if(SS.charAt(i) == 'C') count++;
		}
		if(!(count == 1)) ans = false;
		
		count = 0;
		for(int i = 0; i < S.length(); i++){
			if(S.charAt(i) == 'A') continue;
			if(S.charAt(i) == 'C') continue;
			if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') continue;
			ans = false;
		}
		
		System.out.println(ans?"AC":"WA");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc boolean ans = true; ans true if(!(S.charAt(0) == 'A')) ans = false; !(S.charAt(0) == 'A') (S.charAt(0) == 'A') S.charAt(0) S.charAt S 0 'A' ans = false ans false String SS = S.substring(2, S.length()-1); SS S.substring(2, S.length()-1) S.substring S 2 S.length()-1 S.length() S.length S 1 int count = 0; count 0 for(int i = 0; i < SS.length(); i++){
			if(SS.charAt(i) == 'C') count++;
		} int i = 0; int i = 0; i 0 i < SS.length() i SS.length() SS.length SS i++ i++ i {
			if(SS.charAt(i) == 'C') count++;
		} {
			if(SS.charAt(i) == 'C') count++;
		} if(SS.charAt(i) == 'C') count++; SS.charAt(i) == 'C' SS.charAt(i) SS.charAt SS i 'C' count++ count if(!(count == 1)) ans = false; !(count == 1) (count == 1) count 1 ans = false ans false count = 0 count 0 for(int i = 0; i < S.length(); i++){
			if(S.charAt(i) == 'A') continue;
			if(S.charAt(i) == 'C') continue;
			if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') continue;
			ans = false;
		} 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') continue;
			if(S.charAt(i) == 'C') continue;
			if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') continue;
			ans = false;
		} {
			if(S.charAt(i) == 'A') continue;
			if(S.charAt(i) == 'C') continue;
			if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') continue;
			ans = false;
		} if(S.charAt(i) == 'A') continue; S.charAt(i) == 'A' S.charAt(i) S.charAt S i 'A' continue; if(S.charAt(i) == 'C') continue; S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' continue; if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') continue; 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' continue; ans = false ans false System.out.println(ans?"AC":"WA") System.out.println System.out System System.out ans?"AC":"WA" ans "AC" "WA" String[] args args public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		boolean ans = true;
		
		if(!(S.charAt(0) == 'A')) ans = false;
		
		String SS = S.substring(2, S.length()-1);
		int count = 0;
		for(int i = 0; i < SS.length(); i++){
			if(SS.charAt(i) == 'C') count++;
		}
		if(!(count == 1)) ans = false;
		
		count = 0;
		for(int i = 0; i < S.length(); i++){
			if(S.charAt(i) == 'A') continue;
			if(S.charAt(i) == 'C') continue;
			if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') continue;
			ans = false;
		}
		
		System.out.println(ans?"AC":"WA");
	}
} public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		boolean ans = true;
		
		if(!(S.charAt(0) == 'A')) ans = false;
		
		String SS = S.substring(2, S.length()-1);
		int count = 0;
		for(int i = 0; i < SS.length(); i++){
			if(SS.charAt(i) == 'C') count++;
		}
		if(!(count == 1)) ans = false;
		
		count = 0;
		for(int i = 0; i < S.length(); i++){
			if(S.charAt(i) == 'A') continue;
			if(S.charAt(i) == 'C') continue;
			if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') continue;
			ans = false;
		}
		
		System.out.println(ans?"AC":"WA");
	}
} Main
import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Deque;
import java.util.Scanner;

public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		boolean ans = true;
		
		if(!(S.charAt(0) == 'A')) ans = false;
		
		String SS = S.substring(2, S.length()-1);
		int count = 0;
		for(int i = 0; i < SS.length(); i++){
			if(SS.charAt(i) == 'C') count++;
		}
		if(!(count == 1)) ans = false;
		
		count = 0;
		for(int i = 0; i < S.length(); i++){
			if(S.charAt(i) == 'A') continue;
			if(S.charAt(i) == 'C') continue;
			if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') continue;
			ans = false;
		}
		
		System.out.println(ans?"AC":"WA");
	}
}