import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String ans = "AC";
    int c_count = 0;
    if (s.charAt(0) != 'A') {
      ans = "WA";
    }
    for (int i = 1; i < s.length(); i++) {
      if (Character.isUpperCase(s.charAt(i))) {
        if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        }
      }
    }
    if (c_count != 1) {
      ans = "WA";
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String ans = "AC";
    int c_count = 0;
    if (s.charAt(0) != 'A') {
      ans = "WA";
    }
    for (int i = 1; i < s.length(); i++) {
      if (Character.isUpperCase(s.charAt(i))) {
        if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        }
      }
    }
    if (c_count != 1) {
      ans = "WA";
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String ans = "AC";
    int c_count = 0;
    if (s.charAt(0) != 'A') {
      ans = "WA";
    }
    for (int i = 1; i < s.length(); i++) {
      if (Character.isUpperCase(s.charAt(i))) {
        if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        }
      }
    }
    if (c_count != 1) {
      ans = "WA";
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String ans = "AC";
    int c_count = 0;
    if (s.charAt(0) != 'A') {
      ans = "WA";
    }
    for (int i = 1; i < s.length(); i++) {
      if (Character.isUpperCase(s.charAt(i))) {
        if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        }
      }
    }
    if (c_count != 1) {
      ans = "WA";
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String ans = "AC"; ans "AC" int c_count = 0; c_count 0 if (s.charAt(0) != 'A') {
      ans = "WA";
    } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
      ans = "WA";
    } ans = "WA" ans "WA" for (int i = 1; i < s.length(); i++) {
      if (Character.isUpperCase(s.charAt(i))) {
        if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        }
      }
    } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
      if (Character.isUpperCase(s.charAt(i))) {
        if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        }
      }
    } {
      if (Character.isUpperCase(s.charAt(i))) {
        if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        }
      }
    } if (Character.isUpperCase(s.charAt(i))) {
        if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        }
      } Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
        if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        }
      } if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        } i == 1 || i == s.length() - 1 i == 1 i 1 i == s.length() - 1 i s.length() - 1 s.length() s.length s 1 {
          ans = "WA";
        } ans = "WA" ans "WA" if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        } i > 1 && i < s.length() - 1 i > 1 i 1 i < s.length() - 1 i s.length() - 1 s.length() s.length s 1 {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        } if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
            c_count++;
          } c_count++ c_count {
            ans = "WA";
          } ans = "WA" ans "WA" if (c_count != 1) {
      ans = "WA";
    } c_count != 1 c_count 1 {
      ans = "WA";
    } ans = "WA" ans "WA" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String ans = "AC";
    int c_count = 0;
    if (s.charAt(0) != 'A') {
      ans = "WA";
    }
    for (int i = 1; i < s.length(); i++) {
      if (Character.isUpperCase(s.charAt(i))) {
        if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        }
      }
    }
    if (c_count != 1) {
      ans = "WA";
    }
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String ans = "AC";
    int c_count = 0;
    if (s.charAt(0) != 'A') {
      ans = "WA";
    }
    for (int i = 1; i < s.length(); i++) {
      if (Character.isUpperCase(s.charAt(i))) {
        if (i == 1 || i == s.length() - 1) {
          ans = "WA";
        } else if (i > 1 && i < s.length() - 1) {
          if (s.charAt(i) == 'C') {
            c_count++;
          } else {
            ans = "WA";
          }
        }
      }
    }
    if (c_count != 1) {
      ans = "WA";
    }
    System.out.println(ans);
  }
} Main
import java.util.*;

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