import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String S=sc.next();
    int Len=S.length();
    String model="abcdefghijklmnopqrstuvwxyz";
    
    if(S.charAt(0)=='A'){
    }else{
      System.out.println("WA");
      return;
    }
    
    int Count=0;
    int index=-1;
    for(int i=2;i<Len-1;i++){
      if(S.charAt(i)=='C'){
        Count++;
        index=i;
      }
      if(Count>=2){
        System.out.println("WA");
        return;
      }
    }
    
    if(Count==0){
      System.out.println("WA");
      return;
    }
    
    
    
    for(int i=1;i<Len;i++){
      if(i==index){
      }else{
        for(int j=0;j<26;j++){
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        }
      }
    }
    
    System.out.println("AC");
   
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String S=sc.next();
    int Len=S.length();
    String model="abcdefghijklmnopqrstuvwxyz";
    
    if(S.charAt(0)=='A'){
    }else{
      System.out.println("WA");
      return;
    }
    
    int Count=0;
    int index=-1;
    for(int i=2;i<Len-1;i++){
      if(S.charAt(i)=='C'){
        Count++;
        index=i;
      }
      if(Count>=2){
        System.out.println("WA");
        return;
      }
    }
    
    if(Count==0){
      System.out.println("WA");
      return;
    }
    
    
    
    for(int i=1;i<Len;i++){
      if(i==index){
      }else{
        for(int j=0;j<26;j++){
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        }
      }
    }
    
    System.out.println("AC");
   
  }
} Main public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String S=sc.next();
    int Len=S.length();
    String model="abcdefghijklmnopqrstuvwxyz";
    
    if(S.charAt(0)=='A'){
    }else{
      System.out.println("WA");
      return;
    }
    
    int Count=0;
    int index=-1;
    for(int i=2;i<Len-1;i++){
      if(S.charAt(i)=='C'){
        Count++;
        index=i;
      }
      if(Count>=2){
        System.out.println("WA");
        return;
      }
    }
    
    if(Count==0){
      System.out.println("WA");
      return;
    }
    
    
    
    for(int i=1;i<Len;i++){
      if(i==index){
      }else{
        for(int j=0;j<26;j++){
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        }
      }
    }
    
    System.out.println("AC");
   
  } main {
    Scanner sc=new Scanner(System.in);
    String S=sc.next();
    int Len=S.length();
    String model="abcdefghijklmnopqrstuvwxyz";
    
    if(S.charAt(0)=='A'){
    }else{
      System.out.println("WA");
      return;
    }
    
    int Count=0;
    int index=-1;
    for(int i=2;i<Len-1;i++){
      if(S.charAt(i)=='C'){
        Count++;
        index=i;
      }
      if(Count>=2){
        System.out.println("WA");
        return;
      }
    }
    
    if(Count==0){
      System.out.println("WA");
      return;
    }
    
    
    
    for(int i=1;i<Len;i++){
      if(i==index){
      }else{
        for(int j=0;j<26;j++){
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        }
      }
    }
    
    System.out.println("AC");
   
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String S=sc.next(); S sc.next() sc.next sc int Len=S.length(); Len S.length() S.length S String model="abcdefghijklmnopqrstuvwxyz"; model "abcdefghijklmnopqrstuvwxyz" if(S.charAt(0)=='A'){
    }else{
      System.out.println("WA");
      return;
    } S.charAt(0)=='A' S.charAt(0) S.charAt S 0 'A' {
    } {
      System.out.println("WA");
      return;
    } System.out.println("WA") System.out.println System.out System System.out "WA" return; int Count=0; Count 0 int index=-1; index -1 1 for(int i=2;i<Len-1;i++){
      if(S.charAt(i)=='C'){
        Count++;
        index=i;
      }
      if(Count>=2){
        System.out.println("WA");
        return;
      }
    } int i=2; int i=2; i 2 i<Len-1 i Len-1 Len 1 i++ i++ i {
      if(S.charAt(i)=='C'){
        Count++;
        index=i;
      }
      if(Count>=2){
        System.out.println("WA");
        return;
      }
    } {
      if(S.charAt(i)=='C'){
        Count++;
        index=i;
      }
      if(Count>=2){
        System.out.println("WA");
        return;
      }
    } if(S.charAt(i)=='C'){
        Count++;
        index=i;
      } S.charAt(i)=='C' S.charAt(i) S.charAt S i 'C' {
        Count++;
        index=i;
      } Count++ Count index=i index i if(Count>=2){
        System.out.println("WA");
        return;
      } Count>=2 Count 2 {
        System.out.println("WA");
        return;
      } System.out.println("WA") System.out.println System.out System System.out "WA" return; if(Count==0){
      System.out.println("WA");
      return;
    } Count==0 Count 0 {
      System.out.println("WA");
      return;
    } System.out.println("WA") System.out.println System.out System System.out "WA" return; for(int i=1;i<Len;i++){
      if(i==index){
      }else{
        for(int j=0;j<26;j++){
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        }
      }
    } int i=1; int i=1; i 1 i<Len i Len i++ i++ i {
      if(i==index){
      }else{
        for(int j=0;j<26;j++){
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        }
      }
    } {
      if(i==index){
      }else{
        for(int j=0;j<26;j++){
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        }
      }
    } if(i==index){
      }else{
        for(int j=0;j<26;j++){
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        }
      } i==index i index {
      } {
        for(int j=0;j<26;j++){
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        }
      } for(int j=0;j<26;j++){
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        } int j=0; int j=0; j 0 j<26 j 26 j++ j++ j {
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        } {
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        } if(S.charAt(i)==model.charAt(j)){
            j=26;
          } S.charAt(i)==model.charAt(j) S.charAt(i) S.charAt S i model.charAt(j) model.charAt model j {
            j=26;
          } j=26 j 26 if(j==25){
            System.out.println("WA");
            return;
          } j==25 j 25 {
            System.out.println("WA");
            return;
          } System.out.println("WA") System.out.println System.out System System.out "WA" return; System.out.println("AC") System.out.println System.out System System.out "AC" String[] args args
import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String S=sc.next();
    int Len=S.length();
    String model="abcdefghijklmnopqrstuvwxyz";
    
    if(S.charAt(0)=='A'){
    }else{
      System.out.println("WA");
      return;
    }
    
    int Count=0;
    int index=-1;
    for(int i=2;i<Len-1;i++){
      if(S.charAt(i)=='C'){
        Count++;
        index=i;
      }
      if(Count>=2){
        System.out.println("WA");
        return;
      }
    }
    
    if(Count==0){
      System.out.println("WA");
      return;
    }
    
    
    
    for(int i=1;i<Len;i++){
      if(i==index){
      }else{
        for(int j=0;j<26;j++){
          if(S.charAt(i)==model.charAt(j)){
            j=26;
          }
          if(j==25){
            System.out.println("WA");
            return;
          }
        }
      }
    }
    
    System.out.println("AC");
   
  }
}