import java.util.Scanner;

public class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	String S = sc.next();
	boolean result = false;
	int count=0;
	int cc = -1;
	for(int i=2;i<S.length()-1;i++){
	    if(S.charAt(i) == 'C'){
		result=true;
		count++;
		cc = i;
	    }
	}
	if(S.charAt(0)!='A') result=false;

	if(count != 1){
	    result = false;
	}else if(cc != -1){
	    for(int i=1;i<S.length();i++){
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    }
	}
	if(result) System.out.print("AC");
	else System.out.print("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();
	boolean result = false;
	int count=0;
	int cc = -1;
	for(int i=2;i<S.length()-1;i++){
	    if(S.charAt(i) == 'C'){
		result=true;
		count++;
		cc = i;
	    }
	}
	if(S.charAt(0)!='A') result=false;

	if(count != 1){
	    result = false;
	}else if(cc != -1){
	    for(int i=1;i<S.length();i++){
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    }
	}
	if(result) System.out.print("AC");
	else System.out.print("WA");
    }
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	String S = sc.next();
	boolean result = false;
	int count=0;
	int cc = -1;
	for(int i=2;i<S.length()-1;i++){
	    if(S.charAt(i) == 'C'){
		result=true;
		count++;
		cc = i;
	    }
	}
	if(S.charAt(0)!='A') result=false;

	if(count != 1){
	    result = false;
	}else if(cc != -1){
	    for(int i=1;i<S.length();i++){
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    }
	}
	if(result) System.out.print("AC");
	else System.out.print("WA");
    } main {
	Scanner sc = new Scanner(System.in);
	String S = sc.next();
	boolean result = false;
	int count=0;
	int cc = -1;
	for(int i=2;i<S.length()-1;i++){
	    if(S.charAt(i) == 'C'){
		result=true;
		count++;
		cc = i;
	    }
	}
	if(S.charAt(0)!='A') result=false;

	if(count != 1){
	    result = false;
	}else if(cc != -1){
	    for(int i=1;i<S.length();i++){
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    }
	}
	if(result) System.out.print("AC");
	else System.out.print("WA");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc boolean result = false; result false int count=0; count 0 int cc = -1; cc -1 1 for(int i=2;i<S.length()-1;i++){
	    if(S.charAt(i) == 'C'){
		result=true;
		count++;
		cc = 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'){
		result=true;
		count++;
		cc = i;
	    }
	} {
	    if(S.charAt(i) == 'C'){
		result=true;
		count++;
		cc = i;
	    }
	} if(S.charAt(i) == 'C'){
		result=true;
		count++;
		cc = i;
	    } S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
		result=true;
		count++;
		cc = i;
	    } result=true result true count++ count cc = i cc i if(S.charAt(0)!='A') result=false; S.charAt(0)!='A' S.charAt(0) S.charAt S 0 'A' result=false result false if(count != 1){
	    result = false;
	}else if(cc != -1){
	    for(int i=1;i<S.length();i++){
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    }
	} count != 1 count 1 {
	    result = false;
	} result = false result false if(cc != -1){
	    for(int i=1;i<S.length();i++){
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    }
	} cc != -1 cc -1 1 {
	    for(int i=1;i<S.length();i++){
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    }
	} for(int i=1;i<S.length();i++){
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    } int i=1; int i=1; i 1 i<S.length() i S.length() S.length S i++ i++ i {
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    } {
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    } if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		} i!=cc i cc {
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		} if(Character.isUpperCase(S.charAt(i)))
			result = false; Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i result = false result false if(result) System.out.print("AC");
	else System.out.print("WA"); result System.out.print("AC") System.out.print System.out System System.out "AC" System.out.print("WA") System.out.print 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();
	boolean result = false;
	int count=0;
	int cc = -1;
	for(int i=2;i<S.length()-1;i++){
	    if(S.charAt(i) == 'C'){
		result=true;
		count++;
		cc = i;
	    }
	}
	if(S.charAt(0)!='A') result=false;

	if(count != 1){
	    result = false;
	}else if(cc != -1){
	    for(int i=1;i<S.length();i++){
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    }
	}
	if(result) System.out.print("AC");
	else System.out.print("WA");
    }
} public class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	String S = sc.next();
	boolean result = false;
	int count=0;
	int cc = -1;
	for(int i=2;i<S.length()-1;i++){
	    if(S.charAt(i) == 'C'){
		result=true;
		count++;
		cc = i;
	    }
	}
	if(S.charAt(0)!='A') result=false;

	if(count != 1){
	    result = false;
	}else if(cc != -1){
	    for(int i=1;i<S.length();i++){
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    }
	}
	if(result) System.out.print("AC");
	else System.out.print("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();
	boolean result = false;
	int count=0;
	int cc = -1;
	for(int i=2;i<S.length()-1;i++){
	    if(S.charAt(i) == 'C'){
		result=true;
		count++;
		cc = i;
	    }
	}
	if(S.charAt(0)!='A') result=false;

	if(count != 1){
	    result = false;
	}else if(cc != -1){
	    for(int i=1;i<S.length();i++){
		if(i!=cc){
		    if(Character.isUpperCase(S.charAt(i)))
			result = false;
		}
	    }
	}
	if(result) System.out.print("AC");
	else System.out.print("WA");
    }
}
