import java.util.Scanner;

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

	String s = scan.next();

	if(s.charAt(0) != 'A'){
	    System.out.println("WA");
	}else{
	    int count = 0;
	    int point = 0;
	    for(int i = 2; i < s.length()-1; i++){
		if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		}
	    }
	    if(count != 1){
		System.out.println("WA");
	    }else{
		int flag = 1;
		for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		}
		if(flag == 1){
		    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 scan = new Scanner(System.in);

	String s = scan.next();

	if(s.charAt(0) != 'A'){
	    System.out.println("WA");
	}else{
	    int count = 0;
	    int point = 0;
	    for(int i = 2; i < s.length()-1; i++){
		if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		}
	    }
	    if(count != 1){
		System.out.println("WA");
	    }else{
		int flag = 1;
		for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		}
		if(flag == 1){
		    System.out.println("AC");
		}else{
		    System.out.println("WA");
		}
	    }
	}
    }
} Main public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	String s = scan.next();

	if(s.charAt(0) != 'A'){
	    System.out.println("WA");
	}else{
	    int count = 0;
	    int point = 0;
	    for(int i = 2; i < s.length()-1; i++){
		if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		}
	    }
	    if(count != 1){
		System.out.println("WA");
	    }else{
		int flag = 1;
		for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		}
		if(flag == 1){
		    System.out.println("AC");
		}else{
		    System.out.println("WA");
		}
	    }
	}
    } main {
	Scanner scan = new Scanner(System.in);

	String s = scan.next();

	if(s.charAt(0) != 'A'){
	    System.out.println("WA");
	}else{
	    int count = 0;
	    int point = 0;
	    for(int i = 2; i < s.length()-1; i++){
		if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		}
	    }
	    if(count != 1){
		System.out.println("WA");
	    }else{
		int flag = 1;
		for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		}
		if(flag == 1){
		    System.out.println("AC");
		}else{
		    System.out.println("WA");
		}
	    }
	}
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan if(s.charAt(0) != 'A'){
	    System.out.println("WA");
	}else{
	    int count = 0;
	    int point = 0;
	    for(int i = 2; i < s.length()-1; i++){
		if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		}
	    }
	    if(count != 1){
		System.out.println("WA");
	    }else{
		int flag = 1;
		for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		}
		if(flag == 1){
		    System.out.println("AC");
		}else{
		    System.out.println("WA");
		}
	    }
	} s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
	    System.out.println("WA");
	} System.out.println("WA") System.out.println System.out System System.out "WA" {
	    int count = 0;
	    int point = 0;
	    for(int i = 2; i < s.length()-1; i++){
		if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		}
	    }
	    if(count != 1){
		System.out.println("WA");
	    }else{
		int flag = 1;
		for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		}
		if(flag == 1){
		    System.out.println("AC");
		}else{
		    System.out.println("WA");
		}
	    }
	} int count = 0; count 0 int point = 0; point 0 for(int i = 2; i < s.length()-1; i++){
		if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		}
	    } 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'){
		    count++;
		    point = i;
		}
	    } {
		if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		}
	    } if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		} s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
		    count++;
		    point = i;
		} count++ count point = i point i if(count != 1){
		System.out.println("WA");
	    }else{
		int flag = 1;
		for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		}
		if(flag == 1){
		    System.out.println("AC");
		}else{
		    System.out.println("WA");
		}
	    } count != 1 count 1 {
		System.out.println("WA");
	    } System.out.println("WA") System.out.println System.out System System.out "WA" {
		int flag = 1;
		for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		}
		if(flag == 1){
		    System.out.println("AC");
		}else{
		    System.out.println("WA");
		}
	    } int flag = 1; flag 1 for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		} {
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		} if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    } i == 0 || i == point i == 0 i 0 i == point i point {
			//何もしない
		    } {
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    } if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			} s.charAt(i) < 'a' || s.charAt(i) > 'z' s.charAt(i) < 'a' s.charAt(i) s.charAt s i 'a' s.charAt(i) > 'z' s.charAt(i) s.charAt s i 'z' {
			    flag = -1;
			} flag = -1 flag -1 1 if(flag == 1){
		    System.out.println("AC");
		}else{
		    System.out.println("WA");
		} flag == 1 flag 1 {
		    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 scan = new Scanner(System.in);

	String s = scan.next();

	if(s.charAt(0) != 'A'){
	    System.out.println("WA");
	}else{
	    int count = 0;
	    int point = 0;
	    for(int i = 2; i < s.length()-1; i++){
		if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		}
	    }
	    if(count != 1){
		System.out.println("WA");
	    }else{
		int flag = 1;
		for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		}
		if(flag == 1){
		    System.out.println("AC");
		}else{
		    System.out.println("WA");
		}
	    }
	}
    }
} public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	String s = scan.next();

	if(s.charAt(0) != 'A'){
	    System.out.println("WA");
	}else{
	    int count = 0;
	    int point = 0;
	    for(int i = 2; i < s.length()-1; i++){
		if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		}
	    }
	    if(count != 1){
		System.out.println("WA");
	    }else{
		int flag = 1;
		for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		}
		if(flag == 1){
		    System.out.println("AC");
		}else{
		    System.out.println("WA");
		}
	    }
	}
    }
} Main
import java.util.Scanner;

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

	String s = scan.next();

	if(s.charAt(0) != 'A'){
	    System.out.println("WA");
	}else{
	    int count = 0;
	    int point = 0;
	    for(int i = 2; i < s.length()-1; i++){
		if(s.charAt(i) == 'C'){
		    count++;
		    point = i;
		}
	    }
	    if(count != 1){
		System.out.println("WA");
	    }else{
		int flag = 1;
		for(int i = 0; i < s.length(); i++){
		    if(i == 0 || i == point){
			//何もしない
		    }else{
			if(s.charAt(i) < 'a' || s.charAt(i) > 'z'){
			    flag = -1;
			}
		    }
		}
		if(flag == 1){
		    System.out.println("AC");
		}else{
		    System.out.println("WA");
		}
	    }
	}
    }
}
