import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		String[] s = stdIn.next().split("");
		boolean flag = true;
		
		
		if(!s[0].equals("A")) {
			flag = false;
		}
		int cnt = 0;
		int tmp = 0;
		for(int i = 2; i < s.length-1; i++) {
			if(s[i].equals("C")) {
				cnt++;
				tmp = i;
			}
		}
		
		if(cnt != 1) {
			flag = false;
		}
		
		for(int i = 1; i < s.length; i++) {
			if(i == tmp) {
				continue;
			}else {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			}
			
		}
			if(flag) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		
	}

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

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		String[] s = stdIn.next().split("");
		boolean flag = true;
		
		
		if(!s[0].equals("A")) {
			flag = false;
		}
		int cnt = 0;
		int tmp = 0;
		for(int i = 2; i < s.length-1; i++) {
			if(s[i].equals("C")) {
				cnt++;
				tmp = i;
			}
		}
		
		if(cnt != 1) {
			flag = false;
		}
		
		for(int i = 1; i < s.length; i++) {
			if(i == tmp) {
				continue;
			}else {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			}
			
		}
			if(flag) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		
	}

} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		String[] s = stdIn.next().split("");
		boolean flag = true;
		
		
		if(!s[0].equals("A")) {
			flag = false;
		}
		int cnt = 0;
		int tmp = 0;
		for(int i = 2; i < s.length-1; i++) {
			if(s[i].equals("C")) {
				cnt++;
				tmp = i;
			}
		}
		
		if(cnt != 1) {
			flag = false;
		}
		
		for(int i = 1; i < s.length; i++) {
			if(i == tmp) {
				continue;
			}else {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			}
			
		}
			if(flag) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		
	} main {
		Scanner stdIn = new Scanner(System.in);
		String[] s = stdIn.next().split("");
		boolean flag = true;
		
		
		if(!s[0].equals("A")) {
			flag = false;
		}
		int cnt = 0;
		int tmp = 0;
		for(int i = 2; i < s.length-1; i++) {
			if(s[i].equals("C")) {
				cnt++;
				tmp = i;
			}
		}
		
		if(cnt != 1) {
			flag = false;
		}
		
		for(int i = 1; i < s.length; i++) {
			if(i == tmp) {
				continue;
			}else {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			}
			
		}
			if(flag) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) String[] s = stdIn.next().split(""); s stdIn.next().split("") stdIn.next().split stdIn.next() stdIn.next stdIn "" boolean flag = true; flag true if(!s[0].equals("A")) {
			flag = false;
		} !s[0].equals("A") s[0].equals("A") s[0].equals s[0] s 0 "A" {
			flag = false;
		} flag = false flag false int cnt = 0; cnt 0 int tmp = 0; tmp 0 for(int i = 2; i < s.length-1; i++) {
			if(s[i].equals("C")) {
				cnt++;
				tmp = i;
			}
		} int i = 2; int i = 2; i 2 i < s.length-1 i s.length-1 s.length s s.length 1 i++ i++ i {
			if(s[i].equals("C")) {
				cnt++;
				tmp = i;
			}
		} {
			if(s[i].equals("C")) {
				cnt++;
				tmp = i;
			}
		} if(s[i].equals("C")) {
				cnt++;
				tmp = i;
			} s[i].equals("C") s[i].equals s[i] s i "C" {
				cnt++;
				tmp = i;
			} cnt++ cnt tmp = i tmp i if(cnt != 1) {
			flag = false;
		} cnt != 1 cnt 1 {
			flag = false;
		} flag = false flag false for(int i = 1; i < s.length; i++) {
			if(i == tmp) {
				continue;
			}else {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			}
			
		} int i = 1; int i = 1; i 1 i < s.length i s.length s s.length i++ i++ i {
			if(i == tmp) {
				continue;
			}else {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			}
			
		} {
			if(i == tmp) {
				continue;
			}else {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			}
			
		} if(i == tmp) {
				continue;
			}else {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			} i == tmp i tmp {
				continue;
			} continue; {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			} if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				} !Character.isLowerCase(s[i].charAt(0)) Character.isLowerCase(s[i].charAt(0)) Character.isLowerCase Character s[i].charAt(0) s[i].charAt s[i] s i 0 {
					flag = false;
				} flag = false flag false if(flag) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			} flag {
				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" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		String[] s = stdIn.next().split("");
		boolean flag = true;
		
		
		if(!s[0].equals("A")) {
			flag = false;
		}
		int cnt = 0;
		int tmp = 0;
		for(int i = 2; i < s.length-1; i++) {
			if(s[i].equals("C")) {
				cnt++;
				tmp = i;
			}
		}
		
		if(cnt != 1) {
			flag = false;
		}
		
		for(int i = 1; i < s.length; i++) {
			if(i == tmp) {
				continue;
			}else {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			}
			
		}
			if(flag) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		
	}

} public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		String[] s = stdIn.next().split("");
		boolean flag = true;
		
		
		if(!s[0].equals("A")) {
			flag = false;
		}
		int cnt = 0;
		int tmp = 0;
		for(int i = 2; i < s.length-1; i++) {
			if(s[i].equals("C")) {
				cnt++;
				tmp = i;
			}
		}
		
		if(cnt != 1) {
			flag = false;
		}
		
		for(int i = 1; i < s.length; i++) {
			if(i == tmp) {
				continue;
			}else {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			}
			
		}
			if(flag) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		
	}

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

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		String[] s = stdIn.next().split("");
		boolean flag = true;
		
		
		if(!s[0].equals("A")) {
			flag = false;
		}
		int cnt = 0;
		int tmp = 0;
		for(int i = 2; i < s.length-1; i++) {
			if(s[i].equals("C")) {
				cnt++;
				tmp = i;
			}
		}
		
		if(cnt != 1) {
			flag = false;
		}
		
		for(int i = 1; i < s.length; i++) {
			if(i == tmp) {
				continue;
			}else {
				if(!Character.isLowerCase(s[i].charAt(0))){
					flag = false;
				}
			}
			
		}
			if(flag) {
				System.out.println("AC");
			}else {
				System.out.println("WA");
			}
		
	}

}
