import java.util.*;

class Main{
  public static boolean test(String test){
    int c = 0;
    for(int i = 0;i < test.length();i++){

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

      if(i == 0 ){
        if(test.charAt(i) == 'A'){
          continue;
        }else{
          return false;
        }
      }
      if(i >= 2 && i <= test.length() - 2){
        if(test.charAt(i) == 'C'){
          c++;
          if(c>1){
            return false;
          }
          continue;
        }
      }
      if(Character.isUpperCase(test.charAt(i))){
        return false;
      }
  }
  if(c == 0){
  return false;
}
  return true;
}
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    String a = scan.next();
    if(test(a)){
      System.out.println("AC");
    }else{
      System.out.println("WA");
    }
  }
} Main public static boolean test(String test){
    int c = 0;
    for(int i = 0;i < test.length();i++){

      if(i == 0 ){
        if(test.charAt(i) == 'A'){
          continue;
        }else{
          return false;
        }
      }
      if(i >= 2 && i <= test.length() - 2){
        if(test.charAt(i) == 'C'){
          c++;
          if(c>1){
            return false;
          }
          continue;
        }
      }
      if(Character.isUpperCase(test.charAt(i))){
        return false;
      }
  }
  if(c == 0){
  return false;
}
  return true;
} test {
    int c = 0;
    for(int i = 0;i < test.length();i++){

      if(i == 0 ){
        if(test.charAt(i) == 'A'){
          continue;
        }else{
          return false;
        }
      }
      if(i >= 2 && i <= test.length() - 2){
        if(test.charAt(i) == 'C'){
          c++;
          if(c>1){
            return false;
          }
          continue;
        }
      }
      if(Character.isUpperCase(test.charAt(i))){
        return false;
      }
  }
  if(c == 0){
  return false;
}
  return true;
} int c = 0; c 0 for(int i = 0;i < test.length();i++){

      if(i == 0 ){
        if(test.charAt(i) == 'A'){
          continue;
        }else{
          return false;
        }
      }
      if(i >= 2 && i <= test.length() - 2){
        if(test.charAt(i) == 'C'){
          c++;
          if(c>1){
            return false;
          }
          continue;
        }
      }
      if(Character.isUpperCase(test.charAt(i))){
        return false;
      }
  } int i = 0; int i = 0; i 0 i < test.length() i test.length() test.length test i++ i++ i {

      if(i == 0 ){
        if(test.charAt(i) == 'A'){
          continue;
        }else{
          return false;
        }
      }
      if(i >= 2 && i <= test.length() - 2){
        if(test.charAt(i) == 'C'){
          c++;
          if(c>1){
            return false;
          }
          continue;
        }
      }
      if(Character.isUpperCase(test.charAt(i))){
        return false;
      }
  } {

      if(i == 0 ){
        if(test.charAt(i) == 'A'){
          continue;
        }else{
          return false;
        }
      }
      if(i >= 2 && i <= test.length() - 2){
        if(test.charAt(i) == 'C'){
          c++;
          if(c>1){
            return false;
          }
          continue;
        }
      }
      if(Character.isUpperCase(test.charAt(i))){
        return false;
      }
  } if(i == 0 ){
        if(test.charAt(i) == 'A'){
          continue;
        }else{
          return false;
        }
      } i == 0 i 0 {
        if(test.charAt(i) == 'A'){
          continue;
        }else{
          return false;
        }
      } if(test.charAt(i) == 'A'){
          continue;
        }else{
          return false;
        } test.charAt(i) == 'A' test.charAt(i) test.charAt test i 'A' {
          continue;
        } continue; {
          return false;
        } return false; false if(i >= 2 && i <= test.length() - 2){
        if(test.charAt(i) == 'C'){
          c++;
          if(c>1){
            return false;
          }
          continue;
        }
      } i >= 2 && i <= test.length() - 2 i >= 2 i 2 i <= test.length() - 2 i test.length() - 2 test.length() test.length test 2 {
        if(test.charAt(i) == 'C'){
          c++;
          if(c>1){
            return false;
          }
          continue;
        }
      } if(test.charAt(i) == 'C'){
          c++;
          if(c>1){
            return false;
          }
          continue;
        } test.charAt(i) == 'C' test.charAt(i) test.charAt test i 'C' {
          c++;
          if(c>1){
            return false;
          }
          continue;
        } c++ c if(c>1){
            return false;
          } c>1 c 1 {
            return false;
          } return false; false continue; if(Character.isUpperCase(test.charAt(i))){
        return false;
      } Character.isUpperCase(test.charAt(i)) Character.isUpperCase Character test.charAt(i) test.charAt test i {
        return false;
      } return false; false if(c == 0){
  return false;
} c == 0 c 0 {
  return false;
} return false; false return true; true String test test public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    String a = scan.next();
    if(test(a)){
      System.out.println("AC");
    }else{
      System.out.println("WA");
    }
  } main {
    Scanner scan = new Scanner(System.in);
    String a = scan.next();
    if(test(a)){
      System.out.println("AC");
    }else{
      System.out.println("WA");
    }
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String a = scan.next(); a scan.next() scan.next scan if(test(a)){
      System.out.println("AC");
    }else{
      System.out.println("WA");
    } test(a) test a {
      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
import java.util.*;

class Main{
  public static boolean test(String test){
    int c = 0;
    for(int i = 0;i < test.length();i++){

      if(i == 0 ){
        if(test.charAt(i) == 'A'){
          continue;
        }else{
          return false;
        }
      }
      if(i >= 2 && i <= test.length() - 2){
        if(test.charAt(i) == 'C'){
          c++;
          if(c>1){
            return false;
          }
          continue;
        }
      }
      if(Character.isUpperCase(test.charAt(i))){
        return false;
      }
  }
  if(c == 0){
  return false;
}
  return true;
}
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    String a = scan.next();
    if(test(a)){
      System.out.println("AC");
    }else{
      System.out.println("WA");
    }
  }
}