import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		//long x=sc.nextLong();
		//long k=sc.nextLong();
		String s=sc.next();
		//String buff="";
		//long[] array=new long[n];
		int sum=0,buff,max=0,min=0;
		//int[] array=new int[l];
		//String s="",m="",h="";
		if(s.charAt(0)!='A' ||Character.isUpperCase(s.charAt(s.length()-1))||Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C') {
				sum++;
			}else if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			}

		}

		//Arrays.sort(array)
		if(sum!=1) {
			System.out.println("WA");
		}else {
			System.out.println("AC");
		}
	}
}

//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));

 import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		//long x=sc.nextLong();
		//long k=sc.nextLong();
		String s=sc.next();
		//String buff="";
		//long[] array=new long[n];
		int sum=0,buff,max=0,min=0;
		//int[] array=new int[l];
		//String s="",m="",h="";
		if(s.charAt(0)!='A' ||Character.isUpperCase(s.charAt(s.length()-1))||Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C') {
				sum++;
			}else if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			}

		}

		//Arrays.sort(array)
		if(sum!=1) {
			System.out.println("WA");
		}else {
			System.out.println("AC");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		//long x=sc.nextLong();
		//long k=sc.nextLong();
		String s=sc.next();
		//String buff="";
		//long[] array=new long[n];
		int sum=0,buff,max=0,min=0;
		//int[] array=new int[l];
		//String s="",m="",h="";
		if(s.charAt(0)!='A' ||Character.isUpperCase(s.charAt(s.length()-1))||Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C') {
				sum++;
			}else if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			}

		}

		//Arrays.sort(array)
		if(sum!=1) {
			System.out.println("WA");
		}else {
			System.out.println("AC");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		//long x=sc.nextLong();
		//long k=sc.nextLong();
		String s=sc.next();
		//String buff="";
		//long[] array=new long[n];
		int sum=0,buff,max=0,min=0;
		//int[] array=new int[l];
		//String s="",m="",h="";
		if(s.charAt(0)!='A' ||Character.isUpperCase(s.charAt(s.length()-1))||Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C') {
				sum++;
			}else if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			}

		}

		//Arrays.sort(array)
		if(sum!=1) {
			System.out.println("WA");
		}else {
			System.out.println("AC");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc int sum=0 sum 0 buff buff max=0 max 0 min=0; min 0 if(s.charAt(0)!='A' ||Character.isUpperCase(s.charAt(s.length()-1))||Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			System.exit(0);
		} s.charAt(0)!='A' ||Character.isUpperCase(s.charAt(s.length()-1))||Character.isUpperCase(s.charAt(1)) s.charAt(0)!='A' ||Character.isUpperCase(s.charAt(s.length()-1))||Character.isUpperCase(s.charAt(1)) s.charAt(0)!='A' s.charAt(0) s.charAt s 0 'A' Character.isUpperCase(s.charAt(s.length()-1)) Character.isUpperCase Character s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 Character.isUpperCase(s.charAt(1)) Character.isUpperCase Character s.charAt(1) s.charAt s 1 {
			System.out.println("WA");
			System.exit(0);
		} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C') {
				sum++;
			}else if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			}

		} 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') {
				sum++;
			}else if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			}

		} {
			if(s.charAt(i)=='C') {
				sum++;
			}else if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			}

		} if(s.charAt(i)=='C') {
				sum++;
			}else if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			} s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' {
				sum++;
			} sum++ sum if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			} Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
				System.out.println("WA");
				System.exit(0);
			} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 if(sum!=1) {
			System.out.println("WA");
		}else {
			System.out.println("AC");
		} sum!=1 sum 1 {
			System.out.println("WA");
		} System.out.println("WA") System.out.println System.out System System.out "WA" {
			System.out.println("AC");
		} System.out.println("AC") System.out.println System.out System System.out "AC" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		//long x=sc.nextLong();
		//long k=sc.nextLong();
		String s=sc.next();
		//String buff="";
		//long[] array=new long[n];
		int sum=0,buff,max=0,min=0;
		//int[] array=new int[l];
		//String s="",m="",h="";
		if(s.charAt(0)!='A' ||Character.isUpperCase(s.charAt(s.length()-1))||Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C') {
				sum++;
			}else if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			}

		}

		//Arrays.sort(array)
		if(sum!=1) {
			System.out.println("WA");
		}else {
			System.out.println("AC");
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		//long x=sc.nextLong();
		//long k=sc.nextLong();
		String s=sc.next();
		//String buff="";
		//long[] array=new long[n];
		int sum=0,buff,max=0,min=0;
		//int[] array=new int[l];
		//String s="",m="",h="";
		if(s.charAt(0)!='A' ||Character.isUpperCase(s.charAt(s.length()-1))||Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C') {
				sum++;
			}else if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			}

		}

		//Arrays.sort(array)
		if(sum!=1) {
			System.out.println("WA");
		}else {
			System.out.println("AC");
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		//long x=sc.nextLong();
		//long k=sc.nextLong();
		String s=sc.next();
		//String buff="";
		//long[] array=new long[n];
		int sum=0,buff,max=0,min=0;
		//int[] array=new int[l];
		//String s="",m="",h="";
		if(s.charAt(0)!='A' ||Character.isUpperCase(s.charAt(s.length()-1))||Character.isUpperCase(s.charAt(1))) {
			System.out.println("WA");
			System.exit(0);
		}
		for(int i=2;i<=s.length()-2;i++) {
			if(s.charAt(i)=='C') {
				sum++;
			}else if(Character.isUpperCase(s.charAt(i))){
				System.out.println("WA");
				System.exit(0);
			}

		}

		//Arrays.sort(array)
		if(sum!=1) {
			System.out.println("WA");
		}else {
			System.out.println("AC");
		}
	}
}

//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));


