import java.util.*;
import java.lang.*;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
        }else{
            int n = 0;
            for(int i = 2; i < s.length()-1; i++){
                if(s.charAt(i) == 'C'){
                    n++;
                }
            }
            if (n != 1) {
                System.out.println("WA");
            }else{
                int m = 0;
                for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                }
                if (m != 1) {
                    System.out.println("WA");
                }else{
                    System.out.println("AC");
                }
            }
        }
    }
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
        }else{
            int n = 0;
            for(int i = 2; i < s.length()-1; i++){
                if(s.charAt(i) == 'C'){
                    n++;
                }
            }
            if (n != 1) {
                System.out.println("WA");
            }else{
                int m = 0;
                for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                }
                if (m != 1) {
                    System.out.println("WA");
                }else{
                    System.out.println("AC");
                }
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
        }else{
            int n = 0;
            for(int i = 2; i < s.length()-1; i++){
                if(s.charAt(i) == 'C'){
                    n++;
                }
            }
            if (n != 1) {
                System.out.println("WA");
            }else{
                int m = 0;
                for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                }
                if (m != 1) {
                    System.out.println("WA");
                }else{
                    System.out.println("AC");
                }
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
        }else{
            int n = 0;
            for(int i = 2; i < s.length()-1; i++){
                if(s.charAt(i) == 'C'){
                    n++;
                }
            }
            if (n != 1) {
                System.out.println("WA");
            }else{
                int m = 0;
                for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                }
                if (m != 1) {
                    System.out.println("WA");
                }else{
                    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 if(s.charAt(0) != 'A'){
            System.out.println("WA");
        }else{
            int n = 0;
            for(int i = 2; i < s.length()-1; i++){
                if(s.charAt(i) == 'C'){
                    n++;
                }
            }
            if (n != 1) {
                System.out.println("WA");
            }else{
                int m = 0;
                for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                }
                if (m != 1) {
                    System.out.println("WA");
                }else{
                    System.out.println("AC");
                }
            }
        } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
            System.out.println("WA");
        } System.out.println("WA") System.out.println System.out System System.out "WA" {
            int n = 0;
            for(int i = 2; i < s.length()-1; i++){
                if(s.charAt(i) == 'C'){
                    n++;
                }
            }
            if (n != 1) {
                System.out.println("WA");
            }else{
                int m = 0;
                for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                }
                if (m != 1) {
                    System.out.println("WA");
                }else{
                    System.out.println("AC");
                }
            }
        } int n = 0; n 0 for(int i = 2; i < s.length()-1; i++){
                if(s.charAt(i) == 'C'){
                    n++;
                }
            } 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'){
                    n++;
                }
            } {
                if(s.charAt(i) == 'C'){
                    n++;
                }
            } if(s.charAt(i) == 'C'){
                    n++;
                } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                    n++;
                } n++ n if (n != 1) {
                System.out.println("WA");
            }else{
                int m = 0;
                for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                }
                if (m != 1) {
                    System.out.println("WA");
                }else{
                    System.out.println("AC");
                }
            } n != 1 n 1 {
                System.out.println("WA");
            } System.out.println("WA") System.out.println System.out System System.out "WA" {
                int m = 0;
                for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                }
                if (m != 1) {
                    System.out.println("WA");
                }else{
                    System.out.println("AC");
                }
            } int m = 0; m 0 for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                } {
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                } if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    } Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
                        m++;
                    } m++ m if (m != 1) {
                    System.out.println("WA");
                }else{
                    System.out.println("AC");
                } m != 1 m 1 {
                    System.out.println("WA");
                } System.out.println("WA") System.out.println System.out System System.out "WA" {
                    System.out.println("AC");
                } System.out.println("AC") System.out.println System.out System System.out "AC" String[] args args public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
        }else{
            int n = 0;
            for(int i = 2; i < s.length()-1; i++){
                if(s.charAt(i) == 'C'){
                    n++;
                }
            }
            if (n != 1) {
                System.out.println("WA");
            }else{
                int m = 0;
                for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                }
                if (m != 1) {
                    System.out.println("WA");
                }else{
                    System.out.println("AC");
                }
            }
        }
    }
} public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
        }else{
            int n = 0;
            for(int i = 2; i < s.length()-1; i++){
                if(s.charAt(i) == 'C'){
                    n++;
                }
            }
            if (n != 1) {
                System.out.println("WA");
            }else{
                int m = 0;
                for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                }
                if (m != 1) {
                    System.out.println("WA");
                }else{
                    System.out.println("AC");
                }
            }
        }
    }
} Main
import java.util.*;
import java.lang.*;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
        }else{
            int n = 0;
            for(int i = 2; i < s.length()-1; i++){
                if(s.charAt(i) == 'C'){
                    n++;
                }
            }
            if (n != 1) {
                System.out.println("WA");
            }else{
                int m = 0;
                for(int i = 1; i < s.length(); i++){
                    if(Character.isUpperCase(s.charAt(i))){
                        m++;
                    }
                }
                if (m != 1) {
                    System.out.println("WA");
                }else{
                    System.out.println("AC");
                }
            }
        }
    }
}