import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        sc.close();
        boolean judge = false;

        if(S.charAt(0) != 'A')
            System.out.println("WA");
        else{
            if((S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') || (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z')){
                System.out.println("WA");
                return;
            }
            for(int i = 2; i < S.length() - 1; i++){
                if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            }
            if(judge)
                System.out.println("AC");
            else
                System.out.println("WA");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        sc.close();
        boolean judge = false;

        if(S.charAt(0) != 'A')
            System.out.println("WA");
        else{
            if((S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') || (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z')){
                System.out.println("WA");
                return;
            }
            for(int i = 2; i < S.length() - 1; i++){
                if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            }
            if(judge)
                System.out.println("AC");
            else
                System.out.println("WA");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        sc.close();
        boolean judge = false;

        if(S.charAt(0) != 'A')
            System.out.println("WA");
        else{
            if((S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') || (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z')){
                System.out.println("WA");
                return;
            }
            for(int i = 2; i < S.length() - 1; i++){
                if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            }
            if(judge)
                System.out.println("AC");
            else
                System.out.println("WA");
        }
    } main {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        sc.close();
        boolean judge = false;

        if(S.charAt(0) != 'A')
            System.out.println("WA");
        else{
            if((S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') || (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z')){
                System.out.println("WA");
                return;
            }
            for(int i = 2; i < S.length() - 1; i++){
                if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            }
            if(judge)
                System.out.println("AC");
            else
                System.out.println("WA");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc boolean judge = false; judge false if(S.charAt(0) != 'A')
            System.out.println("WA");
        else{
            if((S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') || (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z')){
                System.out.println("WA");
                return;
            }
            for(int i = 2; i < S.length() - 1; i++){
                if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            }
            if(judge)
                System.out.println("AC");
            else
                System.out.println("WA");
        } S.charAt(0) != 'A' S.charAt(0) S.charAt S 0 'A' System.out.println("WA") System.out.println System.out System System.out "WA" {
            if((S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') || (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z')){
                System.out.println("WA");
                return;
            }
            for(int i = 2; i < S.length() - 1; i++){
                if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            }
            if(judge)
                System.out.println("AC");
            else
                System.out.println("WA");
        } if((S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') || (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z')){
                System.out.println("WA");
                return;
            } (S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') || (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z') (S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') S.charAt(1) >= 'A' S.charAt(1) S.charAt S 1 'A' S.charAt(1) <= 'Z' S.charAt(1) S.charAt S 1 'Z' (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z') S.charAt(S.length() - 1) >= 'A' S.charAt(S.length() - 1) S.charAt S S.length() - 1 S.length() S.length S 1 'A' S.charAt(S.length() - 1) <= 'Z' S.charAt(S.length() - 1) S.charAt S S.length() - 1 S.length() S.length S 1 'Z' {
                System.out.println("WA");
                return;
            } System.out.println("WA") System.out.println System.out System System.out "WA" return; for(int i = 2; i < S.length() - 1; i++){
                if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            } 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'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            } {
                if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            } if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                } S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                } if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true; judge {
                        System.out.println("WA");
                        return;
                    } System.out.println("WA") System.out.println System.out System System.out "WA" return; judge = true judge true if(judge)
                System.out.println("AC");
            else
                System.out.println("WA"); judge System.out.println("AC") System.out.println System.out System System.out "AC" System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        sc.close();
        boolean judge = false;

        if(S.charAt(0) != 'A')
            System.out.println("WA");
        else{
            if((S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') || (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z')){
                System.out.println("WA");
                return;
            }
            for(int i = 2; i < S.length() - 1; i++){
                if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            }
            if(judge)
                System.out.println("AC");
            else
                System.out.println("WA");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        sc.close();
        boolean judge = false;

        if(S.charAt(0) != 'A')
            System.out.println("WA");
        else{
            if((S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') || (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z')){
                System.out.println("WA");
                return;
            }
            for(int i = 2; i < S.length() - 1; i++){
                if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            }
            if(judge)
                System.out.println("AC");
            else
                System.out.println("WA");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        sc.close();
        boolean judge = false;

        if(S.charAt(0) != 'A')
            System.out.println("WA");
        else{
            if((S.charAt(1) >= 'A' && S.charAt(1) <= 'Z') || (S.charAt(S.length() - 1) >= 'A' && S.charAt(S.length() - 1) <= 'Z')){
                System.out.println("WA");
                return;
            }
            for(int i = 2; i < S.length() - 1; i++){
                if(S.charAt(i) == 'C'){
                    if(judge){
                        System.out.println("WA");
                        return;
                    }
                    else
                        judge = true;
                }
            }
            if(judge)
                System.out.println("AC");
            else
                System.out.println("WA");
        }
    }
}
