import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int count=0,check=0;
    if (S.charAt(0) == 'A') {
      for (int i=2; i<S.length()-1; i++) {
        if(S.charAt(i) == 'C') count++;
      }
      for (int i=0; i<S.length(); i++) {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      }
    }
    if (count == 1 && check == S.length()-2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int count=0,check=0;
    if (S.charAt(0) == 'A') {
      for (int i=2; i<S.length()-1; i++) {
        if(S.charAt(i) == 'C') count++;
      }
      for (int i=0; i<S.length(); i++) {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      }
    }
    if (count == 1 && check == S.length()-2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int count=0,check=0;
    if (S.charAt(0) == 'A') {
      for (int i=2; i<S.length()-1; i++) {
        if(S.charAt(i) == 'C') count++;
      }
      for (int i=0; i<S.length(); i++) {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      }
    }
    if (count == 1 && check == S.length()-2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int count=0,check=0;
    if (S.charAt(0) == 'A') {
      for (int i=2; i<S.length()-1; i++) {
        if(S.charAt(i) == 'C') count++;
      }
      for (int i=0; i<S.length(); i++) {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      }
    }
    if (count == 1 && check == S.length()-2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int count=0 count 0 check=0; check 0 if (S.charAt(0) == 'A') {
      for (int i=2; i<S.length()-1; i++) {
        if(S.charAt(i) == 'C') count++;
      }
      for (int i=0; i<S.length(); i++) {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      }
    } S.charAt(0) == 'A' S.charAt(0) S.charAt S 0 'A' {
      for (int i=2; i<S.length()-1; i++) {
        if(S.charAt(i) == 'C') count++;
      }
      for (int i=0; i<S.length(); i++) {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      }
    } for (int i=2; i<S.length()-1; i++) {
        if(S.charAt(i) == 'C') count++;
      } int i=2; int i=2; i 2 i<S.length()-1 i S.length()-1 S.length() S.length S 1 i++ i++ i {
        if(S.charAt(i) == 'C') count++;
      } {
        if(S.charAt(i) == 'C') count++;
      } if(S.charAt(i) == 'C') count++; S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' count++ count for (int i=0; i<S.length(); i++) {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      } int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      } {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      } if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++; S.charAt(i) >= 'a' && S.charAt(i) <= 'z' S.charAt(i) >= 'a' S.charAt(i) S.charAt S i 'a' S.charAt(i) <= 'z' S.charAt(i) S.charAt S i 'z' check++ check if (count == 1 && check == S.length()-2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    } count == 1 && check == S.length()-2 count == 1 count 1 check == S.length()-2 check S.length()-2 S.length() S.length S 2 {
      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 sc = new Scanner(System.in);
    String S = sc.next();
    int count=0,check=0;
    if (S.charAt(0) == 'A') {
      for (int i=2; i<S.length()-1; i++) {
        if(S.charAt(i) == 'C') count++;
      }
      for (int i=0; i<S.length(); i++) {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      }
    }
    if (count == 1 && check == S.length()-2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int count=0,check=0;
    if (S.charAt(0) == 'A') {
      for (int i=2; i<S.length()-1; i++) {
        if(S.charAt(i) == 'C') count++;
      }
      for (int i=0; i<S.length(); i++) {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      }
    }
    if (count == 1 && check == S.length()-2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int count=0,check=0;
    if (S.charAt(0) == 'A') {
      for (int i=2; i<S.length()-1; i++) {
        if(S.charAt(i) == 'C') count++;
      }
      for (int i=0; i<S.length(); i++) {
        if(S.charAt(i) >= 'a' && S.charAt(i) <= 'z') check++;
      }
    }
    if (count == 1 && check == S.length()-2) {
      System.out.println("AC");
    } else {
      System.out.println("WA");
    }
  }
}