import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	int check = 0;
		if (s.charAt(0) != 'A') {
			check = 1;
		}
      	if (s.charAt(1) == 'C') {
			check = 1;
		}
		int count =0;
		for (int i=2;i<s.length()-1; ++i) {
			if (s.charAt(i)=='C') {
				count = count + 1;
			}
		}
		if (count != 1) {
			check = 1;
		}
		for (int i=1;i<s.length(); ++i) {
			if (s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z')) {
				check = 1;
			}
		}
      if(check == 0){
		System.out.println("AC");
      }else{
        System.out.println("WA");
      }
	}
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	int check = 0;
		if (s.charAt(0) != 'A') {
			check = 1;
		}
      	if (s.charAt(1) == 'C') {
			check = 1;
		}
		int count =0;
		for (int i=2;i<s.length()-1; ++i) {
			if (s.charAt(i)=='C') {
				count = count + 1;
			}
		}
		if (count != 1) {
			check = 1;
		}
		for (int i=1;i<s.length(); ++i) {
			if (s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z')) {
				check = 1;
			}
		}
      if(check == 0){
		System.out.println("AC");
      }else{
        System.out.println("WA");
      }
	}
} Main public static void main(String[] args) throws Exception {
        Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	int check = 0;
		if (s.charAt(0) != 'A') {
			check = 1;
		}
      	if (s.charAt(1) == 'C') {
			check = 1;
		}
		int count =0;
		for (int i=2;i<s.length()-1; ++i) {
			if (s.charAt(i)=='C') {
				count = count + 1;
			}
		}
		if (count != 1) {
			check = 1;
		}
		for (int i=1;i<s.length(); ++i) {
			if (s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z')) {
				check = 1;
			}
		}
      if(check == 0){
		System.out.println("AC");
      }else{
        System.out.println("WA");
      }
	} main {
        Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	int check = 0;
		if (s.charAt(0) != 'A') {
			check = 1;
		}
      	if (s.charAt(1) == 'C') {
			check = 1;
		}
		int count =0;
		for (int i=2;i<s.length()-1; ++i) {
			if (s.charAt(i)=='C') {
				count = count + 1;
			}
		}
		if (count != 1) {
			check = 1;
		}
		for (int i=1;i<s.length(); ++i) {
			if (s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z')) {
				check = 1;
			}
		}
      if(check == 0){
		System.out.println("AC");
      }else{
        System.out.println("WA");
      }
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) String s = scn.next(); s scn.next() scn.next scn int check = 0; check 0 if (s.charAt(0) != 'A') {
			check = 1;
		} s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
			check = 1;
		} check = 1 check 1 if (s.charAt(1) == 'C') {
			check = 1;
		} s.charAt(1) == 'C' s.charAt(1) s.charAt s 1 'C' {
			check = 1;
		} check = 1 check 1 int count =0; count 0 for (int i=2;i<s.length()-1; ++i) {
			if (s.charAt(i)=='C') {
				count = count + 1;
			}
		} 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 = count + 1;
			}
		} {
			if (s.charAt(i)=='C') {
				count = count + 1;
			}
		} if (s.charAt(i)=='C') {
				count = count + 1;
			} s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' {
				count = count + 1;
			} count = count + 1 count count + 1 count 1 if (count != 1) {
			check = 1;
		} count != 1 count 1 {
			check = 1;
		} check = 1 check 1 for (int i=1;i<s.length(); ++i) {
			if (s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z')) {
				check = 1;
			}
		} int i=1; int i=1; i 1 i<s.length() i s.length() s.length s ++i ++i i {
			if (s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z')) {
				check = 1;
			}
		} {
			if (s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z')) {
				check = 1;
			}
		} if (s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z')) {
				check = 1;
			} s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z') s.charAt(i)!='C' s.charAt(i) s.charAt s i 'C' (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' {
				check = 1;
			} check = 1 check 1 if(check == 0){
		System.out.println("AC");
      }else{
        System.out.println("WA");
      } check == 0 check 0 {
		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) throws Exception {
        Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	int check = 0;
		if (s.charAt(0) != 'A') {
			check = 1;
		}
      	if (s.charAt(1) == 'C') {
			check = 1;
		}
		int count =0;
		for (int i=2;i<s.length()-1; ++i) {
			if (s.charAt(i)=='C') {
				count = count + 1;
			}
		}
		if (count != 1) {
			check = 1;
		}
		for (int i=1;i<s.length(); ++i) {
			if (s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z')) {
				check = 1;
			}
		}
      if(check == 0){
		System.out.println("AC");
      }else{
        System.out.println("WA");
      }
	}
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	int check = 0;
		if (s.charAt(0) != 'A') {
			check = 1;
		}
      	if (s.charAt(1) == 'C') {
			check = 1;
		}
		int count =0;
		for (int i=2;i<s.length()-1; ++i) {
			if (s.charAt(i)=='C') {
				count = count + 1;
			}
		}
		if (count != 1) {
			check = 1;
		}
		for (int i=1;i<s.length(); ++i) {
			if (s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z')) {
				check = 1;
			}
		}
      if(check == 0){
		System.out.println("AC");
      }else{
        System.out.println("WA");
      }
	}
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	int check = 0;
		if (s.charAt(0) != 'A') {
			check = 1;
		}
      	if (s.charAt(1) == 'C') {
			check = 1;
		}
		int count =0;
		for (int i=2;i<s.length()-1; ++i) {
			if (s.charAt(i)=='C') {
				count = count + 1;
			}
		}
		if (count != 1) {
			check = 1;
		}
		for (int i=1;i<s.length(); ++i) {
			if (s.charAt(i)!='C' && (s.charAt(i)<'a' || s.charAt(i)>'z')) {
				check = 1;
			}
		}
      if(check == 0){
		System.out.println("AC");
      }else{
        System.out.println("WA");
      }
	}
}
