import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    try {
      String s = scanner.next();
      String pattern = "^A[a-z]+C[a-z]+$";
      if (s.matches(pattern)) {
        System.out.println("AC");
      } else {
        System.out.println("WA");
      }
    } finally {
      scanner.close();
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    try {
      String s = scanner.next();
      String pattern = "^A[a-z]+C[a-z]+$";
      if (s.matches(pattern)) {
        System.out.println("AC");
      } else {
        System.out.println("WA");
      }
    } finally {
      scanner.close();
    }
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    try {
      String s = scanner.next();
      String pattern = "^A[a-z]+C[a-z]+$";
      if (s.matches(pattern)) {
        System.out.println("AC");
      } else {
        System.out.println("WA");
      }
    } finally {
      scanner.close();
    }
  } main {
    Scanner scanner = new Scanner(System.in);
    try {
      String s = scanner.next();
      String pattern = "^A[a-z]+C[a-z]+$";
      if (s.matches(pattern)) {
        System.out.println("AC");
      } else {
        System.out.println("WA");
      }
    } finally {
      scanner.close();
    }
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) try {
      String s = scanner.next();
      String pattern = "^A[a-z]+C[a-z]+$";
      if (s.matches(pattern)) {
        System.out.println("AC");
      } else {
        System.out.println("WA");
      }
    } finally {
      scanner.close();
    } {
      scanner.close();
    } scanner.close() scanner.close scanner {
      String s = scanner.next();
      String pattern = "^A[a-z]+C[a-z]+$";
      if (s.matches(pattern)) {
        System.out.println("AC");
      } else {
        System.out.println("WA");
      }
    } String s = scanner.next(); s scanner.next() scanner.next scanner String pattern = "^A[a-z]+C[a-z]+$"; pattern "^A[a-z]+C[a-z]+$" if (s.matches(pattern)) {
        System.out.println("AC");
      } else {
        System.out.println("WA");
      } s.matches(pattern) s.matches s pattern {
        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 scanner = new Scanner(System.in);
    try {
      String s = scanner.next();
      String pattern = "^A[a-z]+C[a-z]+$";
      if (s.matches(pattern)) {
        System.out.println("AC");
      } else {
        System.out.println("WA");
      }
    } finally {
      scanner.close();
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    try {
      String s = scanner.next();
      String pattern = "^A[a-z]+C[a-z]+$";
      if (s.matches(pattern)) {
        System.out.println("AC");
      } else {
        System.out.println("WA");
      }
    } finally {
      scanner.close();
    }
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    try {
      String s = scanner.next();
      String pattern = "^A[a-z]+C[a-z]+$";
      if (s.matches(pattern)) {
        System.out.println("AC");
      } else {
        System.out.println("WA");
      }
    } finally {
      scanner.close();
    }
  }
}
