import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char str[] = sc.next().toCharArray();
    int count = 0;
    if (str[0] != 'A' || Character.isUpperCase(str[1]) || Character.isUpperCase(str[str.length-1])){
        System.out.println("WA");
        return;
    }
    for (int i=2 ; i < str.length-1; i++){
        if(Character.isUpperCase(str[i]) && str[i] =='C'){
            count++;
        }
    }
    System.out.println(count==1?"AC":"WA");
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char str[] = sc.next().toCharArray();
    int count = 0;
    if (str[0] != 'A' || Character.isUpperCase(str[1]) || Character.isUpperCase(str[str.length-1])){
        System.out.println("WA");
        return;
    }
    for (int i=2 ; i < str.length-1; i++){
        if(Character.isUpperCase(str[i]) && str[i] =='C'){
            count++;
        }
    }
    System.out.println(count==1?"AC":"WA");
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char str[] = sc.next().toCharArray();
    int count = 0;
    if (str[0] != 'A' || Character.isUpperCase(str[1]) || Character.isUpperCase(str[str.length-1])){
        System.out.println("WA");
        return;
    }
    for (int i=2 ; i < str.length-1; i++){
        if(Character.isUpperCase(str[i]) && str[i] =='C'){
            count++;
        }
    }
    System.out.println(count==1?"AC":"WA");
  } main {
    Scanner sc = new Scanner(System.in);
    char str[] = sc.next().toCharArray();
    int count = 0;
    if (str[0] != 'A' || Character.isUpperCase(str[1]) || Character.isUpperCase(str[str.length-1])){
        System.out.println("WA");
        return;
    }
    for (int i=2 ; i < str.length-1; i++){
        if(Character.isUpperCase(str[i]) && str[i] =='C'){
            count++;
        }
    }
    System.out.println(count==1?"AC":"WA");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char str[] = sc.next().toCharArray(); str sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int count = 0; count 0 if (str[0] != 'A' || Character.isUpperCase(str[1]) || Character.isUpperCase(str[str.length-1])){
        System.out.println("WA");
        return;
    } str[0] != 'A' || Character.isUpperCase(str[1]) || Character.isUpperCase(str[str.length-1]) str[0] != 'A' || Character.isUpperCase(str[1]) || Character.isUpperCase(str[str.length-1]) str[0] != 'A' str[0] str 0 'A' Character.isUpperCase(str[1]) Character.isUpperCase Character str[1] str 1 Character.isUpperCase(str[str.length-1]) Character.isUpperCase Character str[str.length-1] str str.length-1 str.length str str.length 1 {
        System.out.println("WA");
        return;
    } System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i=2 ; i < str.length-1; i++){
        if(Character.isUpperCase(str[i]) && str[i] =='C'){
            count++;
        }
    } int i=2 ; int i=2 ; i 2 i < str.length-1 i str.length-1 str.length str str.length 1 i++ i++ i {
        if(Character.isUpperCase(str[i]) && str[i] =='C'){
            count++;
        }
    } {
        if(Character.isUpperCase(str[i]) && str[i] =='C'){
            count++;
        }
    } if(Character.isUpperCase(str[i]) && str[i] =='C'){
            count++;
        } Character.isUpperCase(str[i]) && str[i] =='C' Character.isUpperCase(str[i]) Character.isUpperCase Character str[i] str i str[i] =='C' str[i] str i 'C' {
            count++;
        } count++ count System.out.println(count==1?"AC":"WA") System.out.println System.out System System.out count==1?"AC":"WA" count==1 count 1 "AC" "WA" String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char str[] = sc.next().toCharArray();
    int count = 0;
    if (str[0] != 'A' || Character.isUpperCase(str[1]) || Character.isUpperCase(str[str.length-1])){
        System.out.println("WA");
        return;
    }
    for (int i=2 ; i < str.length-1; i++){
        if(Character.isUpperCase(str[i]) && str[i] =='C'){
            count++;
        }
    }
    System.out.println(count==1?"AC":"WA");
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char str[] = sc.next().toCharArray();
    int count = 0;
    if (str[0] != 'A' || Character.isUpperCase(str[1]) || Character.isUpperCase(str[str.length-1])){
        System.out.println("WA");
        return;
    }
    for (int i=2 ; i < str.length-1; i++){
        if(Character.isUpperCase(str[i]) && str[i] =='C'){
            count++;
        }
    }
    System.out.println(count==1?"AC":"WA");
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char str[] = sc.next().toCharArray();
    int count = 0;
    if (str[0] != 'A' || Character.isUpperCase(str[1]) || Character.isUpperCase(str[str.length-1])){
        System.out.println("WA");
        return;
    }
    for (int i=2 ; i < str.length-1; i++){
        if(Character.isUpperCase(str[i]) && str[i] =='C'){
            count++;
        }
    }
    System.out.println(count==1?"AC":"WA");
  }
}