import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
      	int cnt = 0;
        int cnt2 = 0;
      
      if(s.charAt(0)=='A'){
      	for(int i = 2;i < s.length()-1;i++){
        	if(s.charAt(i)=='C'){cnt++;}
        }if(cnt==1){
          for(int i = 0;i < s.length();i++){
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          }
        }
      }
      		if(cnt2==2){
            System.out.println("AC");
        	System.exit(0);
            }
      		System.out.println("WA");
        	System.exit(0);
      
      }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
      	int cnt = 0;
        int cnt2 = 0;
      
      if(s.charAt(0)=='A'){
      	for(int i = 2;i < s.length()-1;i++){
        	if(s.charAt(i)=='C'){cnt++;}
        }if(cnt==1){
          for(int i = 0;i < s.length();i++){
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          }
        }
      }
      		if(cnt2==2){
            System.out.println("AC");
        	System.exit(0);
            }
      		System.out.println("WA");
        	System.exit(0);
      
      }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
      	int cnt = 0;
        int cnt2 = 0;
      
      if(s.charAt(0)=='A'){
      	for(int i = 2;i < s.length()-1;i++){
        	if(s.charAt(i)=='C'){cnt++;}
        }if(cnt==1){
          for(int i = 0;i < s.length();i++){
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          }
        }
      }
      		if(cnt2==2){
            System.out.println("AC");
        	System.exit(0);
            }
      		System.out.println("WA");
        	System.exit(0);
      
      } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
      	int cnt = 0;
        int cnt2 = 0;
      
      if(s.charAt(0)=='A'){
      	for(int i = 2;i < s.length()-1;i++){
        	if(s.charAt(i)=='C'){cnt++;}
        }if(cnt==1){
          for(int i = 0;i < s.length();i++){
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          }
        }
      }
      		if(cnt2==2){
            System.out.println("AC");
        	System.exit(0);
            }
      		System.out.println("WA");
        	System.exit(0);
      
      } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int cnt = 0; cnt 0 int cnt2 = 0; cnt2 0 if(s.charAt(0)=='A'){
      	for(int i = 2;i < s.length()-1;i++){
        	if(s.charAt(i)=='C'){cnt++;}
        }if(cnt==1){
          for(int i = 0;i < s.length();i++){
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          }
        }
      } s.charAt(0)=='A' s.charAt(0) s.charAt s 0 'A' {
      	for(int i = 2;i < s.length()-1;i++){
        	if(s.charAt(i)=='C'){cnt++;}
        }if(cnt==1){
          for(int i = 0;i < s.length();i++){
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          }
        }
      } for(int i = 2;i < s.length()-1;i++){
        	if(s.charAt(i)=='C'){cnt++;}
        } 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'){cnt++;}
        } {
        	if(s.charAt(i)=='C'){cnt++;}
        } if(s.charAt(i)=='C'){cnt++;} s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' {cnt++;} cnt++ cnt if(cnt==1){
          for(int i = 0;i < s.length();i++){
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          }
        } cnt==1 cnt 1 {
          for(int i = 0;i < s.length();i++){
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          }
        } for(int i = 0;i < s.length();i++){
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          } {
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          } if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;} 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' {cnt2++;} cnt2++ cnt2 if(cnt2==2){
            System.out.println("AC");
        	System.exit(0);
            } cnt2==2 cnt2 2 {
            System.out.println("AC");
        	System.exit(0);
            } System.out.println("AC") System.out.println System.out System System.out "AC" System.exit(0) System.exit System 0 System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
      	int cnt = 0;
        int cnt2 = 0;
      
      if(s.charAt(0)=='A'){
      	for(int i = 2;i < s.length()-1;i++){
        	if(s.charAt(i)=='C'){cnt++;}
        }if(cnt==1){
          for(int i = 0;i < s.length();i++){
          	if(s.charAt(i)>='A'&&s.charAt(i)<='Z'){cnt2++;}
          }
        }
      }
      		if(cnt2==2){
            System.out.println("AC");
        	System.exit(0);
            }
      		System.out.println("WA");
        	System.exit(0);
      
      }
}