import java.util.*;

public class Main{
  
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    char[] str = S.toCharArray();
    
    int countC = 0;
    int countBig = 0;
      if(str[0] == 'A'){
        for(int i = 2 ; i <= str.length-2 ; i++){
          if(str[i] == 'C'){
            countC++;
          }
        }
        if(countC == 1){
          for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          }
          if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          }         
        }else{
          System.out.println("WA");
        }       
      }else{
        System.out.println("WA");
      }   
  }
} import java.util.*; util.* java public class Main{
  
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    char[] str = S.toCharArray();
    
    int countC = 0;
    int countBig = 0;
      if(str[0] == 'A'){
        for(int i = 2 ; i <= str.length-2 ; i++){
          if(str[i] == 'C'){
            countC++;
          }
        }
        if(countC == 1){
          for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          }
          if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          }         
        }else{
          System.out.println("WA");
        }       
      }else{
        System.out.println("WA");
      }   
  }
} Main public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    char[] str = S.toCharArray();
    
    int countC = 0;
    int countBig = 0;
      if(str[0] == 'A'){
        for(int i = 2 ; i <= str.length-2 ; i++){
          if(str[i] == 'C'){
            countC++;
          }
        }
        if(countC == 1){
          for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          }
          if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          }         
        }else{
          System.out.println("WA");
        }       
      }else{
        System.out.println("WA");
      }   
  } main {
    
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    char[] str = S.toCharArray();
    
    int countC = 0;
    int countBig = 0;
      if(str[0] == 'A'){
        for(int i = 2 ; i <= str.length-2 ; i++){
          if(str[i] == 'C'){
            countC++;
          }
        }
        if(countC == 1){
          for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          }
          if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          }         
        }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 char[] str = S.toCharArray(); str S.toCharArray() S.toCharArray S int countC = 0; countC 0 int countBig = 0; countBig 0 if(str[0] == 'A'){
        for(int i = 2 ; i <= str.length-2 ; i++){
          if(str[i] == 'C'){
            countC++;
          }
        }
        if(countC == 1){
          for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          }
          if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          }         
        }else{
          System.out.println("WA");
        }       
      }else{
        System.out.println("WA");
      } str[0] == 'A' str[0] str 0 'A' {
        for(int i = 2 ; i <= str.length-2 ; i++){
          if(str[i] == 'C'){
            countC++;
          }
        }
        if(countC == 1){
          for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          }
          if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          }         
        }else{
          System.out.println("WA");
        }       
      } for(int i = 2 ; i <= str.length-2 ; i++){
          if(str[i] == 'C'){
            countC++;
          }
        } int i = 2 ; int i = 2 ; i 2 i <= str.length-2 i str.length-2 str.length str str.length 2 i++ i++ i {
          if(str[i] == 'C'){
            countC++;
          }
        } {
          if(str[i] == 'C'){
            countC++;
          }
        } if(str[i] == 'C'){
            countC++;
          } str[i] == 'C' str[i] str i 'C' {
            countC++;
          } countC++ countC if(countC == 1){
          for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          }
          if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          }         
        }else{
          System.out.println("WA");
        } countC == 1 countC 1 {
          for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          }
          if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          }         
        } for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          } int j = 0 ; int j = 0 ; j 0 j < str.length j str.length str str.length j++ j++ j {
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          } {
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          } char h = str[j]; h str[j] str j if(Character.isUpperCase(h)){
              countBig++;
            } Character.isUpperCase(h) Character.isUpperCase Character h {
              countBig++;
            } countBig++ countBig if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          } countBig == 2 countBig 2 {
            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" {
          System.out.println("WA");
        } 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);
    
    String S = sc.next();
    char[] str = S.toCharArray();
    
    int countC = 0;
    int countBig = 0;
      if(str[0] == 'A'){
        for(int i = 2 ; i <= str.length-2 ; i++){
          if(str[i] == 'C'){
            countC++;
          }
        }
        if(countC == 1){
          for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          }
          if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          }         
        }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);
    
    String S = sc.next();
    char[] str = S.toCharArray();
    
    int countC = 0;
    int countBig = 0;
      if(str[0] == 'A'){
        for(int i = 2 ; i <= str.length-2 ; i++){
          if(str[i] == 'C'){
            countC++;
          }
        }
        if(countC == 1){
          for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          }
          if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          }         
        }else{
          System.out.println("WA");
        }       
      }else{
        System.out.println("WA");
      }   
  }
} Main
import java.util.*;

public class Main{
  
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    char[] str = S.toCharArray();
    
    int countC = 0;
    int countBig = 0;
      if(str[0] == 'A'){
        for(int i = 2 ; i <= str.length-2 ; i++){
          if(str[i] == 'C'){
            countC++;
          }
        }
        if(countC == 1){
          for(int j = 0 ; j < str.length ; j++){
            char h = str[j];
            if(Character.isUpperCase(h)){
              countBig++;
            }
          }
          if(countBig == 2){
            System.out.println("AC");
          }else{
            System.out.println("WA");
          }         
        }else{
          System.out.println("WA");
        }       
      }else{
        System.out.println("WA");
      }   
  }
}