import java.lang.*;
import java.io.*;
import java.util.*;

class Main{
	public static void main(String args[]) throws FileNotFoundException{
		FScanner fs=new FScanner();
		//Scanner sc=new Scanner(System.in);
		
		String[] s=fs.readStringL();
		boolean slv=true;
		
		if(!s[0].equals("A")){
			slv=false;
		}
		
		if(s[1].equals(s[1].toUpperCase())){
			slv=false;
		}
		if(s[s.length-1].equals(s[s.length-1].toUpperCase())){
			slv=false;
		}
		
		int cntC=0;
		
		for(int i=2; i<s.length-1; i++){
			if(s[i].equals("C")){
				cntC+=1;
			}else if(s[i].equals(s[i].toUpperCase())){
				slv=false;
			}
		}
		
		if(cntC!=1){
			slv=false;
		}
		
		System.out.println(slv==true? "AC": "WA");
		
	}

	static void disp(int[] data){
		for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		}
			System.out.println();
	}
	
	static class FScanner{
		Scanner sc;
		FScanner() throws FileNotFoundException{
			sc=new Scanner(System.in);
		}
		int readInt(){
			int i=Integer.parseInt(sc.nextLine());
			return i;
		}
		String[] readStringL(){
			String[] s=sc.nextLine().split("");
			return s;
		}
	}
} import java.lang.*; lang.* java import java.io.*; io.* java import java.util.*; util.* java class Main{
	public static void main(String args[]) throws FileNotFoundException{
		FScanner fs=new FScanner();
		//Scanner sc=new Scanner(System.in);
		
		String[] s=fs.readStringL();
		boolean slv=true;
		
		if(!s[0].equals("A")){
			slv=false;
		}
		
		if(s[1].equals(s[1].toUpperCase())){
			slv=false;
		}
		if(s[s.length-1].equals(s[s.length-1].toUpperCase())){
			slv=false;
		}
		
		int cntC=0;
		
		for(int i=2; i<s.length-1; i++){
			if(s[i].equals("C")){
				cntC+=1;
			}else if(s[i].equals(s[i].toUpperCase())){
				slv=false;
			}
		}
		
		if(cntC!=1){
			slv=false;
		}
		
		System.out.println(slv==true? "AC": "WA");
		
	}

	static void disp(int[] data){
		for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		}
			System.out.println();
	}
	
	static class FScanner{
		Scanner sc;
		FScanner() throws FileNotFoundException{
			sc=new Scanner(System.in);
		}
		int readInt(){
			int i=Integer.parseInt(sc.nextLine());
			return i;
		}
		String[] readStringL(){
			String[] s=sc.nextLine().split("");
			return s;
		}
	}
} Main public static void main(String args[]) throws FileNotFoundException{
		FScanner fs=new FScanner();
		//Scanner sc=new Scanner(System.in);
		
		String[] s=fs.readStringL();
		boolean slv=true;
		
		if(!s[0].equals("A")){
			slv=false;
		}
		
		if(s[1].equals(s[1].toUpperCase())){
			slv=false;
		}
		if(s[s.length-1].equals(s[s.length-1].toUpperCase())){
			slv=false;
		}
		
		int cntC=0;
		
		for(int i=2; i<s.length-1; i++){
			if(s[i].equals("C")){
				cntC+=1;
			}else if(s[i].equals(s[i].toUpperCase())){
				slv=false;
			}
		}
		
		if(cntC!=1){
			slv=false;
		}
		
		System.out.println(slv==true? "AC": "WA");
		
	} main {
		FScanner fs=new FScanner();
		//Scanner sc=new Scanner(System.in);
		
		String[] s=fs.readStringL();
		boolean slv=true;
		
		if(!s[0].equals("A")){
			slv=false;
		}
		
		if(s[1].equals(s[1].toUpperCase())){
			slv=false;
		}
		if(s[s.length-1].equals(s[s.length-1].toUpperCase())){
			slv=false;
		}
		
		int cntC=0;
		
		for(int i=2; i<s.length-1; i++){
			if(s[i].equals("C")){
				cntC+=1;
			}else if(s[i].equals(s[i].toUpperCase())){
				slv=false;
			}
		}
		
		if(cntC!=1){
			slv=false;
		}
		
		System.out.println(slv==true? "AC": "WA");
		
	} FScanner fs=new FScanner(); fs new FScanner() String[] s=fs.readStringL(); s fs.readStringL() fs.readStringL fs boolean slv=true; slv true if(!s[0].equals("A")){
			slv=false;
		} !s[0].equals("A") s[0].equals("A") s[0].equals s[0] s 0 "A" {
			slv=false;
		} slv=false slv false if(s[1].equals(s[1].toUpperCase())){
			slv=false;
		} s[1].equals(s[1].toUpperCase()) s[1].equals s[1] s 1 s[1].toUpperCase() s[1].toUpperCase s[1] s 1 {
			slv=false;
		} slv=false slv false if(s[s.length-1].equals(s[s.length-1].toUpperCase())){
			slv=false;
		} s[s.length-1].equals(s[s.length-1].toUpperCase()) s[s.length-1].equals s[s.length-1] s s.length-1 s.length s s.length 1 s[s.length-1].toUpperCase() s[s.length-1].toUpperCase s[s.length-1] s s.length-1 s.length s s.length 1 {
			slv=false;
		} slv=false slv false int cntC=0; cntC 0 for(int i=2; i<s.length-1; i++){
			if(s[i].equals("C")){
				cntC+=1;
			}else if(s[i].equals(s[i].toUpperCase())){
				slv=false;
			}
		} 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")){
				cntC+=1;
			}else if(s[i].equals(s[i].toUpperCase())){
				slv=false;
			}
		} {
			if(s[i].equals("C")){
				cntC+=1;
			}else if(s[i].equals(s[i].toUpperCase())){
				slv=false;
			}
		} if(s[i].equals("C")){
				cntC+=1;
			}else if(s[i].equals(s[i].toUpperCase())){
				slv=false;
			} s[i].equals("C") s[i].equals s[i] s i "C" {
				cntC+=1;
			} cntC+=1 cntC 1 if(s[i].equals(s[i].toUpperCase())){
				slv=false;
			} s[i].equals(s[i].toUpperCase()) s[i].equals s[i] s i s[i].toUpperCase() s[i].toUpperCase s[i] s i {
				slv=false;
			} slv=false slv false if(cntC!=1){
			slv=false;
		} cntC!=1 cntC 1 {
			slv=false;
		} slv=false slv false System.out.println(slv==true? "AC": "WA") System.out.println System.out System System.out slv==true? "AC": "WA" slv==true slv true "AC" "WA" String args[] args static void disp(int[] data){
		for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		}
			System.out.println();
	} disp {
		for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		}
			System.out.println();
	} for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		} int i=0; int i=0; i 0 i<data.length i data.length data data.length i++ i++ i {
				System.out.printf("%d ",data[i]);
		} {
				System.out.printf("%d ",data[i]);
		} System.out.printf("%d ",data[i]) System.out.printf System.out System System.out "%d " data[i] data i System.out.println() System.out.println System.out System System.out int[] data data static class FScanner{
		Scanner sc;
		FScanner() throws FileNotFoundException{
			sc=new Scanner(System.in);
		}
		int readInt(){
			int i=Integer.parseInt(sc.nextLine());
			return i;
		}
		String[] readStringL(){
			String[] s=sc.nextLine().split("");
			return s;
		}
	} FScanner Scanner sc; sc FScanner() throws FileNotFoundException{
			sc=new Scanner(System.in);
		} FScanner {
			sc=new Scanner(System.in);
		} sc=new Scanner(System.in) sc new Scanner(System.in) int readInt(){
			int i=Integer.parseInt(sc.nextLine());
			return i;
		} readInt {
			int i=Integer.parseInt(sc.nextLine());
			return i;
		} int i=Integer.parseInt(sc.nextLine()); i Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc return i; i String[] readStringL(){
			String[] s=sc.nextLine().split("");
			return s;
		} readStringL {
			String[] s=sc.nextLine().split("");
			return s;
		} String[] s=sc.nextLine().split(""); s sc.nextLine().split("") sc.nextLine().split sc.nextLine() sc.nextLine sc "" return s; s
import java.lang.*;
import java.io.*;
import java.util.*;

class Main{
	public static void main(String args[]) throws FileNotFoundException{
		FScanner fs=new FScanner();
		//Scanner sc=new Scanner(System.in);
		
		String[] s=fs.readStringL();
		boolean slv=true;
		
		if(!s[0].equals("A")){
			slv=false;
		}
		
		if(s[1].equals(s[1].toUpperCase())){
			slv=false;
		}
		if(s[s.length-1].equals(s[s.length-1].toUpperCase())){
			slv=false;
		}
		
		int cntC=0;
		
		for(int i=2; i<s.length-1; i++){
			if(s[i].equals("C")){
				cntC+=1;
			}else if(s[i].equals(s[i].toUpperCase())){
				slv=false;
			}
		}
		
		if(cntC!=1){
			slv=false;
		}
		
		System.out.println(slv==true? "AC": "WA");
		
	}

	static void disp(int[] data){
		for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		}
			System.out.println();
	}
	
	static class FScanner{
		Scanner sc;
		FScanner() throws FileNotFoundException{
			sc=new Scanner(System.in);
		}
		int readInt(){
			int i=Integer.parseInt(sc.nextLine());
			return i;
		}
		String[] readStringL(){
			String[] s=sc.nextLine().split("");
			return s;
		}
	}
}
