import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.nextLine();
    String str = "WA";
    int count = 0;
    boolean f = true;
    int len = a.length();
    if(a.charAt(0) == 'A'){
      for(int i = 2;i < len-1;i++){
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      }
    }
    if(Character.isUpperCase(a.charAt(1)))f=false;
    if(Character.isUpperCase(a.charAt(len-1)))f=false;
    if(count == 1 && f)str = "AC";
    System.out.println(str);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.nextLine();
    String str = "WA";
    int count = 0;
    boolean f = true;
    int len = a.length();
    if(a.charAt(0) == 'A'){
      for(int i = 2;i < len-1;i++){
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      }
    }
    if(Character.isUpperCase(a.charAt(1)))f=false;
    if(Character.isUpperCase(a.charAt(len-1)))f=false;
    if(count == 1 && f)str = "AC";
    System.out.println(str);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.nextLine();
    String str = "WA";
    int count = 0;
    boolean f = true;
    int len = a.length();
    if(a.charAt(0) == 'A'){
      for(int i = 2;i < len-1;i++){
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      }
    }
    if(Character.isUpperCase(a.charAt(1)))f=false;
    if(Character.isUpperCase(a.charAt(len-1)))f=false;
    if(count == 1 && f)str = "AC";
    System.out.println(str);
  } main {
    Scanner sc = new Scanner(System.in);
    String a = sc.nextLine();
    String str = "WA";
    int count = 0;
    boolean f = true;
    int len = a.length();
    if(a.charAt(0) == 'A'){
      for(int i = 2;i < len-1;i++){
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      }
    }
    if(Character.isUpperCase(a.charAt(1)))f=false;
    if(Character.isUpperCase(a.charAt(len-1)))f=false;
    if(count == 1 && f)str = "AC";
    System.out.println(str);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.nextLine(); a sc.nextLine() sc.nextLine sc String str = "WA"; str "WA" int count = 0; count 0 boolean f = true; f true int len = a.length(); len a.length() a.length a if(a.charAt(0) == 'A'){
      for(int i = 2;i < len-1;i++){
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      }
    } a.charAt(0) == 'A' a.charAt(0) a.charAt a 0 'A' {
      for(int i = 2;i < len-1;i++){
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      }
    } for(int i = 2;i < len-1;i++){
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      } int i = 2; int i = 2; i 2 i < len-1 i len-1 len 1 i++ i++ i {
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      } {
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      } if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        } a.charAt(i)=='C' a.charAt(i) a.charAt a i 'C' {
          count++;
        } count++ count {
          if(Character.isUpperCase(a.charAt(i)))f=false;
        } if(Character.isUpperCase(a.charAt(i)))f=false; Character.isUpperCase(a.charAt(i)) Character.isUpperCase Character a.charAt(i) a.charAt a i f=false f false if(Character.isUpperCase(a.charAt(1)))f=false; Character.isUpperCase(a.charAt(1)) Character.isUpperCase Character a.charAt(1) a.charAt a 1 f=false f false if(Character.isUpperCase(a.charAt(len-1)))f=false; Character.isUpperCase(a.charAt(len-1)) Character.isUpperCase Character a.charAt(len-1) a.charAt a len-1 len 1 f=false f false if(count == 1 && f)str = "AC"; count == 1 && f count == 1 count 1 f str = "AC" str "AC" System.out.println(str) System.out.println System.out System System.out str String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.nextLine();
    String str = "WA";
    int count = 0;
    boolean f = true;
    int len = a.length();
    if(a.charAt(0) == 'A'){
      for(int i = 2;i < len-1;i++){
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      }
    }
    if(Character.isUpperCase(a.charAt(1)))f=false;
    if(Character.isUpperCase(a.charAt(len-1)))f=false;
    if(count == 1 && f)str = "AC";
    System.out.println(str);
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.nextLine();
    String str = "WA";
    int count = 0;
    boolean f = true;
    int len = a.length();
    if(a.charAt(0) == 'A'){
      for(int i = 2;i < len-1;i++){
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      }
    }
    if(Character.isUpperCase(a.charAt(1)))f=false;
    if(Character.isUpperCase(a.charAt(len-1)))f=false;
    if(count == 1 && f)str = "AC";
    System.out.println(str);
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.nextLine();
    String str = "WA";
    int count = 0;
    boolean f = true;
    int len = a.length();
    if(a.charAt(0) == 'A'){
      for(int i = 2;i < len-1;i++){
        if(a.charAt(i)=='C'){
          count++;
        }else{
          if(Character.isUpperCase(a.charAt(i)))f=false;
        }
      }
    }
    if(Character.isUpperCase(a.charAt(1)))f=false;
    if(Character.isUpperCase(a.charAt(len-1)))f=false;
    if(count == 1 && f)str = "AC";
    System.out.println(str);
  }
}