import java.util.*;

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

		char[] S = sc.next().toCharArray();
		int c_count = 0;

		for (int i=0; i<S.length; i++){
			if (i == 0){
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			}else if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			}
		}
		if (c_count == 1){
			System.out.println("AC");
			return;
		}else {
			System.out.println("WA");
			return;
		}

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

		char[] S = sc.next().toCharArray();
		int c_count = 0;

		for (int i=0; i<S.length; i++){
			if (i == 0){
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			}else if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			}
		}
		if (c_count == 1){
			System.out.println("AC");
			return;
		}else {
			System.out.println("WA");
			return;
		}

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

		char[] S = sc.next().toCharArray();
		int c_count = 0;

		for (int i=0; i<S.length; i++){
			if (i == 0){
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			}else if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			}
		}
		if (c_count == 1){
			System.out.println("AC");
			return;
		}else {
			System.out.println("WA");
			return;
		}

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

		char[] S = sc.next().toCharArray();
		int c_count = 0;

		for (int i=0; i<S.length; i++){
			if (i == 0){
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			}else if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			}
		}
		if (c_count == 1){
			System.out.println("AC");
			return;
		}else {
			System.out.println("WA");
			return;
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] S = sc.next().toCharArray(); S sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int c_count = 0; c_count 0 for (int i=0; i<S.length; i++){
			if (i == 0){
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			}else if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			}
		} int i=0; int i=0; i 0 i<S.length i S.length S S.length i++ i++ i {
			if (i == 0){
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			}else if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			}
		} {
			if (i == 0){
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			}else if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			}
		} if (i == 0){
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			}else if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			} i == 0 i 0 {
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			} if (S[i] != 'A'){
					System.out.println("WA");
					return;
				} S[i] != 'A' S[i] S i 'A' {
					System.out.println("WA");
					return;
				} System.out.println("WA") System.out.println System.out System System.out "WA" return; if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			} i >= 2 && S.length-2 >= i i >= 2 i 2 S.length-2 >= i S.length-2 S.length S S.length 2 i {
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			} if (S[i] == 'C'){
					c_count += 1;
				} S[i] == 'C' S[i] S i 'C' {
					c_count += 1;
				} c_count += 1 c_count 1 if (c_count > 1){
					System.out.println("WA");
					return;
				} c_count > 1 c_count 1 {
					System.out.println("WA");
					return;
				} System.out.println("WA") System.out.println System.out System System.out "WA" return; if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			} Character.isUpperCase(S[i]) Character.isUpperCase Character S[i] S i {
				System.out.println("WA");
				return;
			} System.out.println("WA") System.out.println System.out System System.out "WA" return; if (c_count == 1){
			System.out.println("AC");
			return;
		}else {
			System.out.println("WA");
			return;
		} c_count == 1 c_count 1 {
			System.out.println("AC");
			return;
		} System.out.println("AC") System.out.println System.out System System.out "AC" return; {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		char[] S = sc.next().toCharArray();
		int c_count = 0;

		for (int i=0; i<S.length; i++){
			if (i == 0){
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			}else if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			}
		}
		if (c_count == 1){
			System.out.println("AC");
			return;
		}else {
			System.out.println("WA");
			return;
		}

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

		char[] S = sc.next().toCharArray();
		int c_count = 0;

		for (int i=0; i<S.length; i++){
			if (i == 0){
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			}else if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			}
		}
		if (c_count == 1){
			System.out.println("AC");
			return;
		}else {
			System.out.println("WA");
			return;
		}

	}
} Main
import java.util.*;

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

		char[] S = sc.next().toCharArray();
		int c_count = 0;

		for (int i=0; i<S.length; i++){
			if (i == 0){
				if (S[i] != 'A'){
					System.out.println("WA");
					return;
				}
			}else if (i >= 2 && S.length-2 >= i){
				if (S[i] == 'C'){
					c_count += 1;
				}
				if (c_count > 1){
					System.out.println("WA");
					return;
				}
			}else if (Character.isUpperCase(S[i])){
				System.out.println("WA");
				return;
			}
		}
		if (c_count == 1){
			System.out.println("AC");
			return;
		}else {
			System.out.println("WA");
			return;
		}

	}
}
