import java.util.*;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean judge = true;
    boolean cex = true;
    
    for(int i = 0; i < s.length() && judge;i++){
      if(i == 0){
      	if(!(s.charAt(i) == 'A')) judge = false;
      }
      else if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      }
    }
  	
    if(!cex && judge) System.out.println("AC");
    else System.out.println("WA");
  }
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean judge = true;
    boolean cex = true;
    
    for(int i = 0; i < s.length() && judge;i++){
      if(i == 0){
      	if(!(s.charAt(i) == 'A')) judge = false;
      }
      else if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      }
    }
  	
    if(!cex && judge) System.out.println("AC");
    else System.out.println("WA");
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean judge = true;
    boolean cex = true;
    
    for(int i = 0; i < s.length() && judge;i++){
      if(i == 0){
      	if(!(s.charAt(i) == 'A')) judge = false;
      }
      else if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      }
    }
  	
    if(!cex && judge) System.out.println("AC");
    else System.out.println("WA");
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean judge = true;
    boolean cex = true;
    
    for(int i = 0; i < s.length() && judge;i++){
      if(i == 0){
      	if(!(s.charAt(i) == 'A')) judge = false;
      }
      else if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      }
    }
  	
    if(!cex && judge) System.out.println("AC");
    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 boolean judge = true; judge true boolean cex = true; cex true for(int i = 0; i < s.length() && judge;i++){
      if(i == 0){
      	if(!(s.charAt(i) == 'A')) judge = false;
      }
      else if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      }
    } int i = 0; int i = 0; i 0 i < s.length() && judge i < s.length() i s.length() s.length s judge i++ i++ i {
      if(i == 0){
      	if(!(s.charAt(i) == 'A')) judge = false;
      }
      else if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      }
    } {
      if(i == 0){
      	if(!(s.charAt(i) == 'A')) judge = false;
      }
      else if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      }
    } if(i == 0){
      	if(!(s.charAt(i) == 'A')) judge = false;
      }
      else if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      } i == 0 i 0 {
      	if(!(s.charAt(i) == 'A')) judge = false;
      } if(!(s.charAt(i) == 'A')) judge = false; !(s.charAt(i) == 'A') (s.charAt(i) == 'A') s.charAt(i) s.charAt s i 'A' judge = false judge false if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      } i > 1 && i < s.length()-1 && cex i > 1 && i < s.length()-1 && cex i > 1 i 1 i < s.length()-1 i s.length()-1 s.length() s.length s 1 cex {
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      } if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' cex = false cex false if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; (int)s.charAt(i) < 96 || 122 < (int)s.charAt(i) (int)s.charAt(i) < 96 (int)s.charAt(i) s.charAt s i 96 122 < (int)s.charAt(i) 122 (int)s.charAt(i) s.charAt s i judge = false judge false {
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      } if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; (int)s.charAt(i) < 96 || 122 < (int)s.charAt(i) (int)s.charAt(i) < 96 (int)s.charAt(i) s.charAt s i 96 122 < (int)s.charAt(i) 122 (int)s.charAt(i) s.charAt s i judge = false judge false if(!cex && judge) System.out.println("AC");
    else System.out.println("WA"); !cex && judge !cex cex judge 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" String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean judge = true;
    boolean cex = true;
    
    for(int i = 0; i < s.length() && judge;i++){
      if(i == 0){
      	if(!(s.charAt(i) == 'A')) judge = false;
      }
      else if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      }
    }
  	
    if(!cex && judge) System.out.println("AC");
    else System.out.println("WA");
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean judge = true;
    boolean cex = true;
    
    for(int i = 0; i < s.length() && judge;i++){
      if(i == 0){
      	if(!(s.charAt(i) == 'A')) judge = false;
      }
      else if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      }
    }
  	
    if(!cex && judge) System.out.println("AC");
    else System.out.println("WA");
  }
} Main
import java.util.*;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean judge = true;
    boolean cex = true;
    
    for(int i = 0; i < s.length() && judge;i++){
      if(i == 0){
      	if(!(s.charAt(i) == 'A')) judge = false;
      }
      else if(i > 1 && i < s.length()-1 && cex){
        if(s.charAt(i) == 'C') cex = false;
        else if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false; 
      }
      else{
        if((int)s.charAt(i) < 96 || 122 < (int)s.charAt(i)) judge = false;
      }
    }
  	
    if(!cex && judge) System.out.println("AC");
    else System.out.println("WA");
  }
}
