import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int n = s.length();
    char[] array = s.toCharArray();
    boolean flag = false;

    if(array[0]=='A'){
      int large_count = 0;
      int small_count = 0;
      for(int i =2; i<n-1;i++){
        if(array[i]=='C'){large_count += 1;}
      }
      if(large_count ==1){
        for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        }
        if(small_count == s.length()-2){
          flag = true;
        }
      }

    }

    if(flag){System.out.println("AC");}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();
    int n = s.length();
    char[] array = s.toCharArray();
    boolean flag = false;

    if(array[0]=='A'){
      int large_count = 0;
      int small_count = 0;
      for(int i =2; i<n-1;i++){
        if(array[i]=='C'){large_count += 1;}
      }
      if(large_count ==1){
        for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        }
        if(small_count == s.length()-2){
          flag = true;
        }
      }

    }

    if(flag){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();
    int n = s.length();
    char[] array = s.toCharArray();
    boolean flag = false;

    if(array[0]=='A'){
      int large_count = 0;
      int small_count = 0;
      for(int i =2; i<n-1;i++){
        if(array[i]=='C'){large_count += 1;}
      }
      if(large_count ==1){
        for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        }
        if(small_count == s.length()-2){
          flag = true;
        }
      }

    }

    if(flag){System.out.println("AC");}else{
      System.out.println("WA");
    }
  } main {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int n = s.length();
    char[] array = s.toCharArray();
    boolean flag = false;

    if(array[0]=='A'){
      int large_count = 0;
      int small_count = 0;
      for(int i =2; i<n-1;i++){
        if(array[i]=='C'){large_count += 1;}
      }
      if(large_count ==1){
        for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        }
        if(small_count == s.length()-2){
          flag = true;
        }
      }

    }

    if(flag){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 int n = s.length(); n s.length() s.length s char[] array = s.toCharArray(); array s.toCharArray() s.toCharArray s boolean flag = false; flag false if(array[0]=='A'){
      int large_count = 0;
      int small_count = 0;
      for(int i =2; i<n-1;i++){
        if(array[i]=='C'){large_count += 1;}
      }
      if(large_count ==1){
        for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        }
        if(small_count == s.length()-2){
          flag = true;
        }
      }

    } array[0]=='A' array[0] array 0 'A' {
      int large_count = 0;
      int small_count = 0;
      for(int i =2; i<n-1;i++){
        if(array[i]=='C'){large_count += 1;}
      }
      if(large_count ==1){
        for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        }
        if(small_count == s.length()-2){
          flag = true;
        }
      }

    } int large_count = 0; large_count 0 int small_count = 0; small_count 0 for(int i =2; i<n-1;i++){
        if(array[i]=='C'){large_count += 1;}
      } int i =2; int i =2; i 2 i<n-1 i n-1 n 1 i++ i++ i {
        if(array[i]=='C'){large_count += 1;}
      } {
        if(array[i]=='C'){large_count += 1;}
      } if(array[i]=='C'){large_count += 1;} array[i]=='C' array[i] array i 'C' {large_count += 1;} large_count += 1 large_count 1 if(large_count ==1){
        for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        }
        if(small_count == s.length()-2){
          flag = true;
        }
      } large_count ==1 large_count 1 {
        for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        }
        if(small_count == s.length()-2){
          flag = true;
        }
      } for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        } int j=0; int j=0; j 0 j<n j n j++ j++ j {
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        } {
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        } if(Character.isLowerCase(array[j])){
            small_count += 1;
          } Character.isLowerCase(array[j]) Character.isLowerCase Character array[j] array j {
            small_count += 1;
          } small_count += 1 small_count 1 if(small_count == s.length()-2){
          flag = true;
        } small_count == s.length()-2 small_count s.length()-2 s.length() s.length s 2 {
          flag = true;
        } flag = true flag true if(flag){System.out.println("AC");}else{
      System.out.println("WA");
    } flag {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){
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int n = s.length();
    char[] array = s.toCharArray();
    boolean flag = false;

    if(array[0]=='A'){
      int large_count = 0;
      int small_count = 0;
      for(int i =2; i<n-1;i++){
        if(array[i]=='C'){large_count += 1;}
      }
      if(large_count ==1){
        for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        }
        if(small_count == s.length()-2){
          flag = true;
        }
      }

    }

    if(flag){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();
    int n = s.length();
    char[] array = s.toCharArray();
    boolean flag = false;

    if(array[0]=='A'){
      int large_count = 0;
      int small_count = 0;
      for(int i =2; i<n-1;i++){
        if(array[i]=='C'){large_count += 1;}
      }
      if(large_count ==1){
        for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        }
        if(small_count == s.length()-2){
          flag = true;
        }
      }

    }

    if(flag){System.out.println("AC");}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();
    int n = s.length();
    char[] array = s.toCharArray();
    boolean flag = false;

    if(array[0]=='A'){
      int large_count = 0;
      int small_count = 0;
      for(int i =2; i<n-1;i++){
        if(array[i]=='C'){large_count += 1;}
      }
      if(large_count ==1){
        for(int j=0; j<n;j++){
          if(Character.isLowerCase(array[j])){
            small_count += 1;
          }
        }
        if(small_count == s.length()-2){
          flag = true;
        }
      }

    }

    if(flag){System.out.println("AC");}else{
      System.out.println("WA");
    }
  }
}