import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int L = S.length();
		int Ucount = 0;
		int Ccount = 0;

		for(int i=0; i<L; i++) {
			if(Character.isUpperCase(S.charAt(i))){
				Ucount += 1;
			}
		}

		for(int j=2; j<L-1; j++) {
			if(S.charAt(j) == 'C') {
				Ccount += 1;
			}
		}

		if(Ucount == 2 && Ccount ==1) {
			if(S.charAt(0) == 'A') {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
		}

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int L = S.length();
		int Ucount = 0;
		int Ccount = 0;

		for(int i=0; i<L; i++) {
			if(Character.isUpperCase(S.charAt(i))){
				Ucount += 1;
			}
		}

		for(int j=2; j<L-1; j++) {
			if(S.charAt(j) == 'C') {
				Ccount += 1;
			}
		}

		if(Ucount == 2 && Ccount ==1) {
			if(S.charAt(0) == 'A') {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
		}

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int L = S.length();
		int Ucount = 0;
		int Ccount = 0;

		for(int i=0; i<L; i++) {
			if(Character.isUpperCase(S.charAt(i))){
				Ucount += 1;
			}
		}

		for(int j=2; j<L-1; j++) {
			if(S.charAt(j) == 'C') {
				Ccount += 1;
			}
		}

		if(Ucount == 2 && Ccount ==1) {
			if(S.charAt(0) == 'A') {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
		}

	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int L = S.length();
		int Ucount = 0;
		int Ccount = 0;

		for(int i=0; i<L; i++) {
			if(Character.isUpperCase(S.charAt(i))){
				Ucount += 1;
			}
		}

		for(int j=2; j<L-1; j++) {
			if(S.charAt(j) == 'C') {
				Ccount += 1;
			}
		}

		if(Ucount == 2 && Ccount ==1) {
			if(S.charAt(0) == 'A') {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}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 L = S.length(); L S.length() S.length S int Ucount = 0; Ucount 0 int Ccount = 0; Ccount 0 for(int i=0; i<L; i++) {
			if(Character.isUpperCase(S.charAt(i))){
				Ucount += 1;
			}
		} int i=0; int i=0; i 0 i<L i L i++ i++ i {
			if(Character.isUpperCase(S.charAt(i))){
				Ucount += 1;
			}
		} {
			if(Character.isUpperCase(S.charAt(i))){
				Ucount += 1;
			}
		} if(Character.isUpperCase(S.charAt(i))){
				Ucount += 1;
			} Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
				Ucount += 1;
			} Ucount += 1 Ucount 1 for(int j=2; j<L-1; j++) {
			if(S.charAt(j) == 'C') {
				Ccount += 1;
			}
		} int j=2; int j=2; j 2 j<L-1 j L-1 L 1 j++ j++ j {
			if(S.charAt(j) == 'C') {
				Ccount += 1;
			}
		} {
			if(S.charAt(j) == 'C') {
				Ccount += 1;
			}
		} if(S.charAt(j) == 'C') {
				Ccount += 1;
			} S.charAt(j) == 'C' S.charAt(j) S.charAt S j 'C' {
				Ccount += 1;
			} Ccount += 1 Ccount 1 if(Ucount == 2 && Ccount ==1) {
			if(S.charAt(0) == 'A') {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
		} Ucount == 2 && Ccount ==1 Ucount == 2 Ucount 2 Ccount ==1 Ccount 1 {
			if(S.charAt(0) == 'A') {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		} if(S.charAt(0) == 'A') {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			} S.charAt(0) == 'A' S.charAt(0) S.charAt S 0 'A' {
				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" {
			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 L = S.length();
		int Ucount = 0;
		int Ccount = 0;

		for(int i=0; i<L; i++) {
			if(Character.isUpperCase(S.charAt(i))){
				Ucount += 1;
			}
		}

		for(int j=2; j<L-1; j++) {
			if(S.charAt(j) == 'C') {
				Ccount += 1;
			}
		}

		if(Ucount == 2 && Ccount ==1) {
			if(S.charAt(0) == 'A') {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}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 L = S.length();
		int Ucount = 0;
		int Ccount = 0;

		for(int i=0; i<L; i++) {
			if(Character.isUpperCase(S.charAt(i))){
				Ucount += 1;
			}
		}

		for(int j=2; j<L-1; j++) {
			if(S.charAt(j) == 'C') {
				Ccount += 1;
			}
		}

		if(Ucount == 2 && Ccount ==1) {
			if(S.charAt(0) == 'A') {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
		}

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int L = S.length();
		int Ucount = 0;
		int Ccount = 0;

		for(int i=0; i<L; i++) {
			if(Character.isUpperCase(S.charAt(i))){
				Ucount += 1;
			}
		}

		for(int j=2; j<L-1; j++) {
			if(S.charAt(j) == 'C') {
				Ccount += 1;
			}
		}

		if(Ucount == 2 && Ccount ==1) {
			if(S.charAt(0) == 'A') {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		}else {
			System.out.println("WA");
		}

	}

}
