import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		
		if(s.charAt(0)!='A') {
			System.out.println("WA");
			return;
		}
		
		int cnt=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C')cnt++;
		}
		if(cnt!=1) {
			System.out.println("WA");
			return;
		}
		
		cnt=0;
		for(int i=0;i<s.length();i++) {
			if(Character.isUpperCase(s.charAt(i)))cnt++;
		}
		if(cnt!=2) {
			System.out.println("WA");
			return;
		}
		
		System.out.println("AC");
	}
} import java.util.Scanner; Scanner java.util public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		
		if(s.charAt(0)!='A') {
			System.out.println("WA");
			return;
		}
		
		int cnt=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C')cnt++;
		}
		if(cnt!=1) {
			System.out.println("WA");
			return;
		}
		
		cnt=0;
		for(int i=0;i<s.length();i++) {
			if(Character.isUpperCase(s.charAt(i)))cnt++;
		}
		if(cnt!=2) {
			System.out.println("WA");
			return;
		}
		
		System.out.println("AC");
	}
} Main @SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		
		if(s.charAt(0)!='A') {
			System.out.println("WA");
			return;
		}
		
		int cnt=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C')cnt++;
		}
		if(cnt!=1) {
			System.out.println("WA");
			return;
		}
		
		cnt=0;
		for(int i=0;i<s.length();i++) {
			if(Character.isUpperCase(s.charAt(i)))cnt++;
		}
		if(cnt!=2) {
			System.out.println("WA");
			return;
		}
		
		System.out.println("AC");
	} main {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		
		if(s.charAt(0)!='A') {
			System.out.println("WA");
			return;
		}
		
		int cnt=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C')cnt++;
		}
		if(cnt!=1) {
			System.out.println("WA");
			return;
		}
		
		cnt=0;
		for(int i=0;i<s.length();i++) {
			if(Character.isUpperCase(s.charAt(i)))cnt++;
		}
		if(cnt!=2) {
			System.out.println("WA");
			return;
		}
		
		System.out.println("AC");
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.next(); s scanner.next() scanner.next scanner if(s.charAt(0)!='A') {
			System.out.println("WA");
			return;
		} s.charAt(0)!='A' s.charAt(0) s.charAt s 0 'A' {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; int cnt=0; cnt 0 for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C')cnt++;
		} int i=2; int i=2; i 2 i<=s.length()-2 i s.length()-2 s.length() s.length s 2 i++ i++ i {
			if(s.charAt(i)=='C')cnt++;
		} {
			if(s.charAt(i)=='C')cnt++;
		} if(s.charAt(i)=='C')cnt++; s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' cnt++ cnt if(cnt!=1) {
			System.out.println("WA");
			return;
		} cnt!=1 cnt 1 {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; cnt=0 cnt 0 for(int i=0;i<s.length();i++) {
			if(Character.isUpperCase(s.charAt(i)))cnt++;
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			if(Character.isUpperCase(s.charAt(i)))cnt++;
		} {
			if(Character.isUpperCase(s.charAt(i)))cnt++;
		} if(Character.isUpperCase(s.charAt(i)))cnt++; Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i cnt++ cnt if(cnt!=2) {
			System.out.println("WA");
			return;
		} cnt!=2 cnt 2 {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; System.out.println("AC") System.out.println System.out System System.out "AC" String args[] args public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		
		if(s.charAt(0)!='A') {
			System.out.println("WA");
			return;
		}
		
		int cnt=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C')cnt++;
		}
		if(cnt!=1) {
			System.out.println("WA");
			return;
		}
		
		cnt=0;
		for(int i=0;i<s.length();i++) {
			if(Character.isUpperCase(s.charAt(i)))cnt++;
		}
		if(cnt!=2) {
			System.out.println("WA");
			return;
		}
		
		System.out.println("AC");
	}
} public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		
		if(s.charAt(0)!='A') {
			System.out.println("WA");
			return;
		}
		
		int cnt=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C')cnt++;
		}
		if(cnt!=1) {
			System.out.println("WA");
			return;
		}
		
		cnt=0;
		for(int i=0;i<s.length();i++) {
			if(Character.isUpperCase(s.charAt(i)))cnt++;
		}
		if(cnt!=2) {
			System.out.println("WA");
			return;
		}
		
		System.out.println("AC");
	}
} Main
import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		
		if(s.charAt(0)!='A') {
			System.out.println("WA");
			return;
		}
		
		int cnt=0;
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C')cnt++;
		}
		if(cnt!=1) {
			System.out.println("WA");
			return;
		}
		
		cnt=0;
		for(int i=0;i<s.length();i++) {
			if(Character.isUpperCase(s.charAt(i)))cnt++;
		}
		if(cnt!=2) {
			System.out.println("WA");
			return;
		}
		
		System.out.println("AC");
	}
}