import java.util.Scanner;

public class Main {
  private static Scanner sc;

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


  private void solve() {
    String S = sc.next();
    boolean flg = false;
    if (S.startsWith("A")) {
      String sub = S.substring(2, S.length() - 1);
      int cnt = 0;
      for (int i = 0; i < sub.length(); i++) {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      }

      if (cnt == 1) {
        int ucnt = 0;
        for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        }

        if (ucnt == 2) {
          flg = true;
        }
      }
    }

    if (flg) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
}
 import java.util.Scanner; Scanner java.util public class Main {
  private static Scanner sc;

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


  private void solve() {
    String S = sc.next();
    boolean flg = false;
    if (S.startsWith("A")) {
      String sub = S.substring(2, S.length() - 1);
      int cnt = 0;
      for (int i = 0; i < sub.length(); i++) {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      }

      if (cnt == 1) {
        int ucnt = 0;
        for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        }

        if (ucnt == 2) {
          flg = true;
        }
      }
    }

    if (flg) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
} Main private static Scanner sc; sc public static void main(String[] args) {
    sc = new Scanner(System.in);
    new Main().solve();
  } main {
    sc = new Scanner(System.in);
    new Main().solve();
  } sc = new Scanner(System.in) sc new Scanner(System.in) new Main().solve() new Main().solve new Main() String[] args args private void solve() {
    String S = sc.next();
    boolean flg = false;
    if (S.startsWith("A")) {
      String sub = S.substring(2, S.length() - 1);
      int cnt = 0;
      for (int i = 0; i < sub.length(); i++) {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      }

      if (cnt == 1) {
        int ucnt = 0;
        for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        }

        if (ucnt == 2) {
          flg = true;
        }
      }
    }

    if (flg) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  } solve {
    String S = sc.next();
    boolean flg = false;
    if (S.startsWith("A")) {
      String sub = S.substring(2, S.length() - 1);
      int cnt = 0;
      for (int i = 0; i < sub.length(); i++) {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      }

      if (cnt == 1) {
        int ucnt = 0;
        for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        }

        if (ucnt == 2) {
          flg = true;
        }
      }
    }

    if (flg) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  } String S = sc.next(); S sc.next() sc.next sc boolean flg = false; flg false if (S.startsWith("A")) {
      String sub = S.substring(2, S.length() - 1);
      int cnt = 0;
      for (int i = 0; i < sub.length(); i++) {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      }

      if (cnt == 1) {
        int ucnt = 0;
        for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        }

        if (ucnt == 2) {
          flg = true;
        }
      }
    } S.startsWith("A") S.startsWith S "A" {
      String sub = S.substring(2, S.length() - 1);
      int cnt = 0;
      for (int i = 0; i < sub.length(); i++) {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      }

      if (cnt == 1) {
        int ucnt = 0;
        for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        }

        if (ucnt == 2) {
          flg = true;
        }
      }
    } String sub = S.substring(2, S.length() - 1); sub S.substring(2, S.length() - 1) S.substring S 2 S.length() - 1 S.length() S.length S 1 int cnt = 0; cnt 0 for (int i = 0; i < sub.length(); i++) {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      } int i = 0; int i = 0; i 0 i < sub.length() i sub.length() sub.length sub i++ i++ i {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      } {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      } char c = sub.charAt(i); c sub.charAt(i) sub.charAt sub i if (c == 'C') cnt++; c == 'C' c 'C' cnt++ cnt if (cnt == 1) {
        int ucnt = 0;
        for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        }

        if (ucnt == 2) {
          flg = true;
        }
      } cnt == 1 cnt 1 {
        int ucnt = 0;
        for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        }

        if (ucnt == 2) {
          flg = true;
        }
      } int ucnt = 0; ucnt 0 for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        } {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        } char c = S.charAt(i); c S.charAt(i) S.charAt S i if (Character.isUpperCase(c)) {
            ucnt++;
          } Character.isUpperCase(c) Character.isUpperCase Character c {
            ucnt++;
          } ucnt++ ucnt if (ucnt == 2) {
          flg = true;
        } ucnt == 2 ucnt 2 {
          flg = true;
        } flg = true flg true if (flg) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    } flg {
      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" public class Main {
  private static Scanner sc;

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


  private void solve() {
    String S = sc.next();
    boolean flg = false;
    if (S.startsWith("A")) {
      String sub = S.substring(2, S.length() - 1);
      int cnt = 0;
      for (int i = 0; i < sub.length(); i++) {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      }

      if (cnt == 1) {
        int ucnt = 0;
        for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        }

        if (ucnt == 2) {
          flg = true;
        }
      }
    }

    if (flg) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
} public class Main {
  private static Scanner sc;

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


  private void solve() {
    String S = sc.next();
    boolean flg = false;
    if (S.startsWith("A")) {
      String sub = S.substring(2, S.length() - 1);
      int cnt = 0;
      for (int i = 0; i < sub.length(); i++) {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      }

      if (cnt == 1) {
        int ucnt = 0;
        for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        }

        if (ucnt == 2) {
          flg = true;
        }
      }
    }

    if (flg) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
} Main
import java.util.Scanner;

public class Main {
  private static Scanner sc;

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


  private void solve() {
    String S = sc.next();
    boolean flg = false;
    if (S.startsWith("A")) {
      String sub = S.substring(2, S.length() - 1);
      int cnt = 0;
      for (int i = 0; i < sub.length(); i++) {
        char c = sub.charAt(i);
        if (c == 'C') cnt++;
      }

      if (cnt == 1) {
        int ucnt = 0;
        for (int i = 0; i < S.length(); i++) {
          char c = S.charAt(i);
          if (Character.isUpperCase(c)) {
            ucnt++;
          }
        }

        if (ucnt == 2) {
          flg = true;
        }
      }
    }

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

