import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int a = s.indexOf("A");
    int b = s.indexOf("C");
    int c = s.lastIndexOf("C");
    String w = "AC";
    if(a==0){
      if(b==c && b>=2 && b<=(n-2)){
        for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        }
      }
      else{
        w="WA";
      }
    }
    else{
      w = "WA";
    }
    System.out.println(w);
  }
} 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 n = s.length();
    int a = s.indexOf("A");
    int b = s.indexOf("C");
    int c = s.lastIndexOf("C");
    String w = "AC";
    if(a==0){
      if(b==c && b>=2 && b<=(n-2)){
        for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        }
      }
      else{
        w="WA";
      }
    }
    else{
      w = "WA";
    }
    System.out.println(w);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int a = s.indexOf("A");
    int b = s.indexOf("C");
    int c = s.lastIndexOf("C");
    String w = "AC";
    if(a==0){
      if(b==c && b>=2 && b<=(n-2)){
        for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        }
      }
      else{
        w="WA";
      }
    }
    else{
      w = "WA";
    }
    System.out.println(w);
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int a = s.indexOf("A");
    int b = s.indexOf("C");
    int c = s.lastIndexOf("C");
    String w = "AC";
    if(a==0){
      if(b==c && b>=2 && b<=(n-2)){
        for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        }
      }
      else{
        w="WA";
      }
    }
    else{
      w = "WA";
    }
    System.out.println(w);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int n = s.length(); n s.length() s.length s int a = s.indexOf("A"); a s.indexOf("A") s.indexOf s "A" int b = s.indexOf("C"); b s.indexOf("C") s.indexOf s "C" int c = s.lastIndexOf("C"); c s.lastIndexOf("C") s.lastIndexOf s "C" String w = "AC"; w "AC" if(a==0){
      if(b==c && b>=2 && b<=(n-2)){
        for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        }
      }
      else{
        w="WA";
      }
    }
    else{
      w = "WA";
    } a==0 a 0 {
      if(b==c && b>=2 && b<=(n-2)){
        for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        }
      }
      else{
        w="WA";
      }
    } if(b==c && b>=2 && b<=(n-2)){
        for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        }
      }
      else{
        w="WA";
      } b==c && b>=2 && b<=(n-2) b==c && b>=2 && b<=(n-2) b==c b c b>=2 b 2 b<=(n-2) b (n-2) n 2 {
        for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        }
      } for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        } int i=1; int i=1; i 1 i<n i n i++ i++ i {
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        } {
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        } if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          } i!=b i b {
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          } int d = s.codePointAt(i); d s.codePointAt(i) s.codePointAt s i if(d>=65 && d<=90){
              w = "WA";
            } d>=65 && d<=90 d>=65 d 65 d<=90 d 90 {
              w = "WA";
            } w = "WA" w "WA" {
        w="WA";
      } w="WA" w "WA" {
      w = "WA";
    } w = "WA" w "WA" System.out.println(w) System.out.println System.out System System.out w String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int a = s.indexOf("A");
    int b = s.indexOf("C");
    int c = s.lastIndexOf("C");
    String w = "AC";
    if(a==0){
      if(b==c && b>=2 && b<=(n-2)){
        for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        }
      }
      else{
        w="WA";
      }
    }
    else{
      w = "WA";
    }
    System.out.println(w);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int a = s.indexOf("A");
    int b = s.indexOf("C");
    int c = s.lastIndexOf("C");
    String w = "AC";
    if(a==0){
      if(b==c && b>=2 && b<=(n-2)){
        for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        }
      }
      else{
        w="WA";
      }
    }
    else{
      w = "WA";
    }
    System.out.println(w);
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int a = s.indexOf("A");
    int b = s.indexOf("C");
    int c = s.lastIndexOf("C");
    String w = "AC";
    if(a==0){
      if(b==c && b>=2 && b<=(n-2)){
        for(int i=1; i<n; i++){
          if(i!=b){
            int d = s.codePointAt(i);
            if(d>=65 && d<=90){
              w = "WA";
            }
          }
        }
      }
      else{
        w="WA";
      }
    }
    else{
      w = "WA";
    }
    System.out.println(w);
  }
}
