import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_big= new ArrayList<String>(Arrays.asList(s.split("")));
		if(!list.get(0).equals("A")) {
			System.out.println("WA");
			System.exit(0);
		}
		int count=0;
		for(int i=2;list.size()-1>i;i++) {
			if(list.get(i).equals("C"))
				count++;
		}
		if(count==1) {
			int two =0;
			for(int i=0;list.size()>i;i++) {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			}
			for(int i=0;list.size()>i;i++) {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			}
			if(two==2)
				System.out.println("AC");
			else
				System.out.println("WA");
		}
		else {
			System.out.println("WA");
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Locale; Locale java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_big= new ArrayList<String>(Arrays.asList(s.split("")));
		if(!list.get(0).equals("A")) {
			System.out.println("WA");
			System.exit(0);
		}
		int count=0;
		for(int i=2;list.size()-1>i;i++) {
			if(list.get(i).equals("C"))
				count++;
		}
		if(count==1) {
			int two =0;
			for(int i=0;list.size()>i;i++) {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			}
			for(int i=0;list.size()>i;i++) {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			}
			if(two==2)
				System.out.println("AC");
			else
				System.out.println("WA");
		}
		else {
			System.out.println("WA");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_big= new ArrayList<String>(Arrays.asList(s.split("")));
		if(!list.get(0).equals("A")) {
			System.out.println("WA");
			System.exit(0);
		}
		int count=0;
		for(int i=2;list.size()-1>i;i++) {
			if(list.get(i).equals("C"))
				count++;
		}
		if(count==1) {
			int two =0;
			for(int i=0;list.size()>i;i++) {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			}
			for(int i=0;list.size()>i;i++) {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			}
			if(two==2)
				System.out.println("AC");
			else
				System.out.println("WA");
		}
		else {
			System.out.println("WA");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_big= new ArrayList<String>(Arrays.asList(s.split("")));
		if(!list.get(0).equals("A")) {
			System.out.println("WA");
			System.exit(0);
		}
		int count=0;
		for(int i=2;list.size()-1>i;i++) {
			if(list.get(i).equals("C"))
				count++;
		}
		if(count==1) {
			int two =0;
			for(int i=0;list.size()>i;i++) {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			}
			for(int i=0;list.size()>i;i++) {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			}
			if(two==2)
				System.out.println("AC");
			else
				System.out.println("WA");
		}
		else {
			System.out.println("WA");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc List<String> list= new ArrayList<String>(Arrays.asList(s.split(""))); list new ArrayList<String>(Arrays.asList(s.split(""))) List<String> list_big= new ArrayList<String>(Arrays.asList(s.split(""))); list_big new ArrayList<String>(Arrays.asList(s.split(""))) if(!list.get(0).equals("A")) {
			System.out.println("WA");
			System.exit(0);
		} !list.get(0).equals("A") list.get(0).equals("A") list.get(0).equals list.get(0) list.get list 0 "A" {
			System.out.println("WA");
			System.exit(0);
		} System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 int count=0; count 0 for(int i=2;list.size()-1>i;i++) {
			if(list.get(i).equals("C"))
				count++;
		} int i=2; int i=2; i 2 list.size()-1>i list.size()-1 list.size() list.size list 1 i i++ i++ i {
			if(list.get(i).equals("C"))
				count++;
		} {
			if(list.get(i).equals("C"))
				count++;
		} if(list.get(i).equals("C"))
				count++; list.get(i).equals("C") list.get(i).equals list.get(i) list.get list i "C" count++ count if(count==1) {
			int two =0;
			for(int i=0;list.size()>i;i++) {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			}
			for(int i=0;list.size()>i;i++) {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			}
			if(two==2)
				System.out.println("AC");
			else
				System.out.println("WA");
		}
		else {
			System.out.println("WA");
		} count==1 count 1 {
			int two =0;
			for(int i=0;list.size()>i;i++) {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			}
			for(int i=0;list.size()>i;i++) {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			}
			if(two==2)
				System.out.println("AC");
			else
				System.out.println("WA");
		} int two =0; two 0 for(int i=0;list.size()>i;i++) {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			} int i=0; int i=0; i 0 list.size()>i list.size() list.size list i i++ i++ i {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			} {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			} String x = list_big.get(i).toUpperCase(Locale.getDefault()); x list_big.get(i).toUpperCase(Locale.getDefault()) list_big.get(i).toUpperCase list_big.get(i) list_big.get list_big i Locale.getDefault() Locale.getDefault Locale list_big.set(i, x) list_big.set list_big i x for(int i=0;list.size()>i;i++) {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			} int i=0; int i=0; i 0 list.size()>i list.size() list.size list i i++ i++ i {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			} {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			} if(list.get(i).equals(list_big.get(i)))
					two++; list.get(i).equals(list_big.get(i)) list.get(i).equals list.get(i) list.get list i list_big.get(i) list_big.get list_big i two++ two if(two==2)
				System.out.println("AC");
			else
				System.out.println("WA"); two==2 two 2 System.out.println("AC") System.out.println System.out System System.out "AC" System.out.println("WA") System.out.println System.out System System.out "WA" {
			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 sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_big= new ArrayList<String>(Arrays.asList(s.split("")));
		if(!list.get(0).equals("A")) {
			System.out.println("WA");
			System.exit(0);
		}
		int count=0;
		for(int i=2;list.size()-1>i;i++) {
			if(list.get(i).equals("C"))
				count++;
		}
		if(count==1) {
			int two =0;
			for(int i=0;list.size()>i;i++) {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			}
			for(int i=0;list.size()>i;i++) {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			}
			if(two==2)
				System.out.println("AC");
			else
				System.out.println("WA");
		}
		else {
			System.out.println("WA");
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_big= new ArrayList<String>(Arrays.asList(s.split("")));
		if(!list.get(0).equals("A")) {
			System.out.println("WA");
			System.exit(0);
		}
		int count=0;
		for(int i=2;list.size()-1>i;i++) {
			if(list.get(i).equals("C"))
				count++;
		}
		if(count==1) {
			int two =0;
			for(int i=0;list.size()>i;i++) {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			}
			for(int i=0;list.size()>i;i++) {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			}
			if(two==2)
				System.out.println("AC");
			else
				System.out.println("WA");
		}
		else {
			System.out.println("WA");
		}
	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_big= new ArrayList<String>(Arrays.asList(s.split("")));
		if(!list.get(0).equals("A")) {
			System.out.println("WA");
			System.exit(0);
		}
		int count=0;
		for(int i=2;list.size()-1>i;i++) {
			if(list.get(i).equals("C"))
				count++;
		}
		if(count==1) {
			int two =0;
			for(int i=0;list.size()>i;i++) {
				String x = list_big.get(i).toUpperCase(Locale.getDefault());
				list_big.set(i, x);
			}
			for(int i=0;list.size()>i;i++) {
				if(list.get(i).equals(list_big.get(i)))
					two++;
			}
			if(two==2)
				System.out.println("AC");
			else
				System.out.println("WA");
		}
		else {
			System.out.println("WA");
		}
	}
}