import java.util.*;

public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();

    sc.close();

    String result = "WA";

    char[] s = S.toCharArray();
    String[] s_= S.split("");

    if (s_[0].equals("A")) {

      int count = 0;
      int position = 0;

      for (int i = 2; i <= s_.length - 2; i++) {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      }

      if (count == 1) {
        for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        }
      }

    }

    System.out.println(result);

  }

} import java.util.*; util.* java public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();

    sc.close();

    String result = "WA";

    char[] s = S.toCharArray();
    String[] s_= S.split("");

    if (s_[0].equals("A")) {

      int count = 0;
      int position = 0;

      for (int i = 2; i <= s_.length - 2; i++) {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      }

      if (count == 1) {
        for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        }
      }

    }

    System.out.println(result);

  }

} Main public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();

    sc.close();

    String result = "WA";

    char[] s = S.toCharArray();
    String[] s_= S.split("");

    if (s_[0].equals("A")) {

      int count = 0;
      int position = 0;

      for (int i = 2; i <= s_.length - 2; i++) {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      }

      if (count == 1) {
        for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        }
      }

    }

    System.out.println(result);

  } main {

    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();

    sc.close();

    String result = "WA";

    char[] s = S.toCharArray();
    String[] s_= S.split("");

    if (s_[0].equals("A")) {

      int count = 0;
      int position = 0;

      for (int i = 2; i <= s_.length - 2; i++) {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      }

      if (count == 1) {
        for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        }
      }

    }

    System.out.println(result);

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc String result = "WA"; result "WA" char[] s = S.toCharArray(); s S.toCharArray() S.toCharArray S String[] s_= S.split(""); s_ S.split("") S.split S "" if (s_[0].equals("A")) {

      int count = 0;
      int position = 0;

      for (int i = 2; i <= s_.length - 2; i++) {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      }

      if (count == 1) {
        for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        }
      }

    } s_[0].equals("A") s_[0].equals s_[0] s_ 0 "A" {

      int count = 0;
      int position = 0;

      for (int i = 2; i <= s_.length - 2; i++) {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      }

      if (count == 1) {
        for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        }
      }

    } int count = 0; count 0 int position = 0; position 0 for (int i = 2; i <= s_.length - 2; i++) {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      } int i = 2; int i = 2; i 2 i <= s_.length - 2 i s_.length - 2 s_.length s_ s_.length 2 i++ i++ i {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      } {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      } if (s_[i].equals("C")) {
          count++;
          position = i;
        } s_[i].equals("C") s_[i].equals s_[i] s_ i "C" {
          count++;
          position = i;
        } count++ count position = i position i if (count == 1) {
        for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        }
      } count == 1 count 1 {
        for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        }
      } for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        } int i = 1; int i = 1; i 1 i < s.length i s.length s s.length i++ i++ i {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        } {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        } if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          } i != position i position {
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          } if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            } 97 <= (int)s[i] && (int)s[i] <= 122 97 <= (int)s[i] 97 (int)s[i] s i (int)s[i] <= 122 (int)s[i] s i 122 {
              result = "AC";
            } result = "AC" result "AC" {
              result = "WA";
              break;
            } result = "WA" result "WA" break; System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();

    sc.close();

    String result = "WA";

    char[] s = S.toCharArray();
    String[] s_= S.split("");

    if (s_[0].equals("A")) {

      int count = 0;
      int position = 0;

      for (int i = 2; i <= s_.length - 2; i++) {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      }

      if (count == 1) {
        for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        }
      }

    }

    System.out.println(result);

  }

} public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();

    sc.close();

    String result = "WA";

    char[] s = S.toCharArray();
    String[] s_= S.split("");

    if (s_[0].equals("A")) {

      int count = 0;
      int position = 0;

      for (int i = 2; i <= s_.length - 2; i++) {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      }

      if (count == 1) {
        for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        }
      }

    }

    System.out.println(result);

  }

} Main
import java.util.*;

public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();

    sc.close();

    String result = "WA";

    char[] s = S.toCharArray();
    String[] s_= S.split("");

    if (s_[0].equals("A")) {

      int count = 0;
      int position = 0;

      for (int i = 2; i <= s_.length - 2; i++) {
        if (s_[i].equals("C")) {
          count++;
          position = i;
        }
      }

      if (count == 1) {
        for (int i = 1; i < s.length; i++) {
          if (i != position){
            if (97 <= (int)s[i] && (int)s[i] <= 122) {
              result = "AC";
            } else {
              result = "WA";
              break;
            }
          }
        }
      }

    }

    System.out.println(result);

  }

}