import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String S = br.readLine();

		if(S.charAt(0) != 0x41){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(1)>0x60 && S.charAt(1)<0x7B)){
			System.out.println("WA");
			return;
		}
		int cnt = 0;
		for(int i=2;i<S.length()-1;i++){
			if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			}
		}
		if(cnt  != 1){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(S.length()-1)>0x60 && S.charAt(S.length()-1)<0x7B)){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws Exception{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String S = br.readLine();

		if(S.charAt(0) != 0x41){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(1)>0x60 && S.charAt(1)<0x7B)){
			System.out.println("WA");
			return;
		}
		int cnt = 0;
		for(int i=2;i<S.length()-1;i++){
			if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			}
		}
		if(cnt  != 1){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(S.length()-1)>0x60 && S.charAt(S.length()-1)<0x7B)){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}

} Main public static void main(String[] args) throws Exception{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String S = br.readLine();

		if(S.charAt(0) != 0x41){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(1)>0x60 && S.charAt(1)<0x7B)){
			System.out.println("WA");
			return;
		}
		int cnt = 0;
		for(int i=2;i<S.length()-1;i++){
			if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			}
		}
		if(cnt  != 1){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(S.length()-1)>0x60 && S.charAt(S.length()-1)<0x7B)){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	} main {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String S = br.readLine();

		if(S.charAt(0) != 0x41){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(1)>0x60 && S.charAt(1)<0x7B)){
			System.out.println("WA");
			return;
		}
		int cnt = 0;
		for(int i=2;i<S.length()-1;i++){
			if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			}
		}
		if(cnt  != 1){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(S.length()-1)>0x60 && S.charAt(S.length()-1)<0x7B)){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String S = br.readLine(); S br.readLine() br.readLine br if(S.charAt(0) != 0x41){
			System.out.println("WA");
			return;
		} S.charAt(0) != 0x41 S.charAt(0) S.charAt S 0 0x41 {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; if(!(S.charAt(1)>0x60 && S.charAt(1)<0x7B)){
			System.out.println("WA");
			return;
		} !(S.charAt(1)>0x60 && S.charAt(1)<0x7B) (S.charAt(1)>0x60 && S.charAt(1)<0x7B) S.charAt(1)>0x60 S.charAt(1) S.charAt S 1 0x60 S.charAt(1)<0x7B S.charAt(1) S.charAt S 1 0x7B {
			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()-1;i++){
			if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			}
		} int i=2; int i=2; i 2 i<S.length()-1 i S.length()-1 S.length() S.length S 1 i++ i++ i {
			if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			}
		} {
			if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			}
		} if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			} S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
				cnt++;
			} cnt++ cnt if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			} !(S.charAt(i)>0x60 && S.charAt(i)<0x7B) (S.charAt(i)>0x60 && S.charAt(i)<0x7B) S.charAt(i)>0x60 S.charAt(i) S.charAt S i 0x60 S.charAt(i)<0x7B S.charAt(i) S.charAt S i 0x7B {
				System.out.println("WA");
				return;
			} System.out.println("WA") System.out.println System.out System System.out "WA" return; 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; if(!(S.charAt(S.length()-1)>0x60 && S.charAt(S.length()-1)<0x7B)){
			System.out.println("WA");
			return;
		} !(S.charAt(S.length()-1)>0x60 && S.charAt(S.length()-1)<0x7B) (S.charAt(S.length()-1)>0x60 && S.charAt(S.length()-1)<0x7B) S.charAt(S.length()-1)>0x60 S.charAt(S.length()-1) S.charAt S S.length()-1 S.length() S.length S 1 0x60 S.charAt(S.length()-1)<0x7B S.charAt(S.length()-1) S.charAt S S.length()-1 S.length() S.length S 1 0x7B {
			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 {

	public static void main(String[] args) throws Exception{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String S = br.readLine();

		if(S.charAt(0) != 0x41){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(1)>0x60 && S.charAt(1)<0x7B)){
			System.out.println("WA");
			return;
		}
		int cnt = 0;
		for(int i=2;i<S.length()-1;i++){
			if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			}
		}
		if(cnt  != 1){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(S.length()-1)>0x60 && S.charAt(S.length()-1)<0x7B)){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}

} public class Main {

	public static void main(String[] args) throws Exception{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String S = br.readLine();

		if(S.charAt(0) != 0x41){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(1)>0x60 && S.charAt(1)<0x7B)){
			System.out.println("WA");
			return;
		}
		int cnt = 0;
		for(int i=2;i<S.length()-1;i++){
			if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			}
		}
		if(cnt  != 1){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(S.length()-1)>0x60 && S.charAt(S.length()-1)<0x7B)){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String S = br.readLine();

		if(S.charAt(0) != 0x41){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(1)>0x60 && S.charAt(1)<0x7B)){
			System.out.println("WA");
			return;
		}
		int cnt = 0;
		for(int i=2;i<S.length()-1;i++){
			if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			}
		}
		if(cnt  != 1){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(S.length()-1)>0x60 && S.charAt(S.length()-1)<0x7B)){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}

}
