import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    String subs = s.substring(2,s.length()-1);
    boolean flg = true;
    int countC = 0;
    if(!s.substring(0,1).equals("A"))
      flg = false;
    for(int i=0; i<subs.length(); i++) {
      if(subs.charAt(i)=='C')
        countC++;
    }
    if(countC!=1)
      flg = false;
    for(int i=1; i<s.length(); i++) {
      if(!s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)))
         flg = false;
    }
    System.out.println(flg==false?"WA":"AC");
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    String subs = s.substring(2,s.length()-1);
    boolean flg = true;
    int countC = 0;
    if(!s.substring(0,1).equals("A"))
      flg = false;
    for(int i=0; i<subs.length(); i++) {
      if(subs.charAt(i)=='C')
        countC++;
    }
    if(countC!=1)
      flg = false;
    for(int i=1; i<s.length(); i++) {
      if(!s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)))
         flg = false;
    }
    System.out.println(flg==false?"WA":"AC");
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    String subs = s.substring(2,s.length()-1);
    boolean flg = true;
    int countC = 0;
    if(!s.substring(0,1).equals("A"))
      flg = false;
    for(int i=0; i<subs.length(); i++) {
      if(subs.charAt(i)=='C')
        countC++;
    }
    if(countC!=1)
      flg = false;
    for(int i=1; i<s.length(); i++) {
      if(!s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)))
         flg = false;
    }
    System.out.println(flg==false?"WA":"AC");
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    String subs = s.substring(2,s.length()-1);
    boolean flg = true;
    int countC = 0;
    if(!s.substring(0,1).equals("A"))
      flg = false;
    for(int i=0; i<subs.length(); i++) {
      if(subs.charAt(i)=='C')
        countC++;
    }
    if(countC!=1)
      flg = false;
    for(int i=1; i<s.length(); i++) {
      if(!s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)))
         flg = false;
    }
    System.out.println(flg==false?"WA":"AC");
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String s = in.readLine(); s in.readLine() in.readLine in String subs = s.substring(2,s.length()-1); subs s.substring(2,s.length()-1) s.substring s 2 s.length()-1 s.length() s.length s 1 boolean flg = true; flg true int countC = 0; countC 0 if(!s.substring(0,1).equals("A"))
      flg = false; !s.substring(0,1).equals("A") s.substring(0,1).equals("A") s.substring(0,1).equals s.substring(0,1) s.substring s 0 1 "A" flg = false flg false for(int i=0; i<subs.length(); i++) {
      if(subs.charAt(i)=='C')
        countC++;
    } int i=0; int i=0; i 0 i<subs.length() i subs.length() subs.length subs i++ i++ i {
      if(subs.charAt(i)=='C')
        countC++;
    } {
      if(subs.charAt(i)=='C')
        countC++;
    } if(subs.charAt(i)=='C')
        countC++; subs.charAt(i)=='C' subs.charAt(i) subs.charAt subs i 'C' countC++ countC if(countC!=1)
      flg = false; countC!=1 countC 1 flg = false flg false for(int i=1; i<s.length(); i++) {
      if(!s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)))
         flg = false;
    } int i=1; int i=1; i 1 i<s.length() i s.length() s.length s i++ i++ i {
      if(!s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)))
         flg = false;
    } {
      if(!s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)))
         flg = false;
    } if(!s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)))
         flg = false; !s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)) !s.substring(i,i+1).equals("C") s.substring(i,i+1).equals("C") s.substring(i,i+1).equals s.substring(i,i+1) s.substring s i i+1 i 1 "C" Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i flg = false flg false System.out.println(flg==false?"WA":"AC") System.out.println System.out System System.out flg==false?"WA":"AC" flg==false flg false "WA" "AC" String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    String subs = s.substring(2,s.length()-1);
    boolean flg = true;
    int countC = 0;
    if(!s.substring(0,1).equals("A"))
      flg = false;
    for(int i=0; i<subs.length(); i++) {
      if(subs.charAt(i)=='C')
        countC++;
    }
    if(countC!=1)
      flg = false;
    for(int i=1; i<s.length(); i++) {
      if(!s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)))
         flg = false;
    }
    System.out.println(flg==false?"WA":"AC");
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    String subs = s.substring(2,s.length()-1);
    boolean flg = true;
    int countC = 0;
    if(!s.substring(0,1).equals("A"))
      flg = false;
    for(int i=0; i<subs.length(); i++) {
      if(subs.charAt(i)=='C')
        countC++;
    }
    if(countC!=1)
      flg = false;
    for(int i=1; i<s.length(); i++) {
      if(!s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)))
         flg = false;
    }
    System.out.println(flg==false?"WA":"AC");
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    String subs = s.substring(2,s.length()-1);
    boolean flg = true;
    int countC = 0;
    if(!s.substring(0,1).equals("A"))
      flg = false;
    for(int i=0; i<subs.length(); i++) {
      if(subs.charAt(i)=='C')
        countC++;
    }
    if(countC!=1)
      flg = false;
    for(int i=1; i<s.length(); i++) {
      if(!s.substring(i,i+1).equals("C") && Character.isUpperCase(s.charAt(i)))
         flg = false;
    }
    System.out.println(flg==false?"WA":"AC");
  }
}