import java.util.*;

/**
 * Created by Santa.
 */
public class Main {

    static int N;
    static int M;
    static int A;
    static long B;
    static long C;
//    static int[][] map;
    static int min = 9999999;

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

        String s = scanner.nextLine();

        int cnt = 0;
        int ok = 1;
        for (int i = 0; i < s.length(); i++) {
            if(i == 0){
                if(s.charAt(0) != 'A')ok = 0;
            }else if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            }
        }

        if(s.charAt(s.length() - 1) == 'C')ok = 0;
        if(cnt == 0)ok = 0;

        if(ok == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }




}
 import java.util.*; util.* java public class Main {

    static int N;
    static int M;
    static int A;
    static long B;
    static long C;
//    static int[][] map;
    static int min = 9999999;

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

        String s = scanner.nextLine();

        int cnt = 0;
        int ok = 1;
        for (int i = 0; i < s.length(); i++) {
            if(i == 0){
                if(s.charAt(0) != 'A')ok = 0;
            }else if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            }
        }

        if(s.charAt(s.length() - 1) == 'C')ok = 0;
        if(cnt == 0)ok = 0;

        if(ok == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }




} Main static int N; N static int M; M static int A; A static long B; B static long C; C //    static int[][] map;
    static int min = 9999999; min 9999999 public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        String s = scanner.nextLine();

        int cnt = 0;
        int ok = 1;
        for (int i = 0; i < s.length(); i++) {
            if(i == 0){
                if(s.charAt(0) != 'A')ok = 0;
            }else if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            }
        }

        if(s.charAt(s.length() - 1) == 'C')ok = 0;
        if(cnt == 0)ok = 0;

        if(ok == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    } main {
        Scanner scanner = new Scanner(System.in);

        String s = scanner.nextLine();

        int cnt = 0;
        int ok = 1;
        for (int i = 0; i < s.length(); i++) {
            if(i == 0){
                if(s.charAt(0) != 'A')ok = 0;
            }else if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            }
        }

        if(s.charAt(s.length() - 1) == 'C')ok = 0;
        if(cnt == 0)ok = 0;

        if(ok == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.nextLine(); s scanner.nextLine() scanner.nextLine scanner int cnt = 0; cnt 0 int ok = 1; ok 1 for (int i = 0; i < s.length(); i++) {
            if(i == 0){
                if(s.charAt(0) != 'A')ok = 0;
            }else if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if(i == 0){
                if(s.charAt(0) != 'A')ok = 0;
            }else if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            }
        } {
            if(i == 0){
                if(s.charAt(0) != 'A')ok = 0;
            }else if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            }
        } if(i == 0){
                if(s.charAt(0) != 'A')ok = 0;
            }else if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            } i == 0 i 0 {
                if(s.charAt(0) != 'A')ok = 0;
            } if(s.charAt(0) != 'A')ok = 0; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' ok = 0 ok 0 if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            } i == 1 i 1 {
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            } if(s.charAt(1) == 'C')ok = 0; s.charAt(1) == 'C' s.charAt(1) s.charAt s 1 'C' ok = 0 ok 0 if(s.charAt(1) == 'A')ok = 0; s.charAt(1) == 'A' s.charAt(1) s.charAt s 1 'A' ok = 0 ok 0 String temp  = String.valueOf(s.charAt(i)); temp String.valueOf(s.charAt(i)) String.valueOf String s.charAt(i) s.charAt s i if(temp.equals(temp.toUpperCase()))ok = 0; temp.equals(temp.toUpperCase()) temp.equals temp temp.toUpperCase() temp.toUpperCase temp ok = 0 ok 0 {
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            } String temp  = String.valueOf(s.charAt(i)); temp String.valueOf(s.charAt(i)) String.valueOf String s.charAt(i) s.charAt s i if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                } if(cnt == 1)ok = 0; cnt == 1 cnt 1 ok = 0 ok 0 cnt = 1 cnt 1 {
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                } if(temp.equals(temp.toUpperCase()))ok = 0; temp.equals(temp.toUpperCase()) temp.equals temp temp.toUpperCase() temp.toUpperCase temp ok = 0 ok 0 if(s.charAt(s.length() - 1) == 'C')ok = 0; s.charAt(s.length() - 1) == 'C' s.charAt(s.length() - 1) s.charAt s s.length() - 1 s.length() s.length s 1 'C' ok = 0 ok 0 if(cnt == 0)ok = 0; cnt == 0 cnt 0 ok = 0 ok 0 if(ok == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        } ok == 1 ok 1 {
            System.out.println("AC");
        } System.out.println("AC") System.out.println System.out System System.out "AC" {
            System.out.println("WA");
        } System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public class Main {

    static int N;
    static int M;
    static int A;
    static long B;
    static long C;
//    static int[][] map;
    static int min = 9999999;

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

        String s = scanner.nextLine();

        int cnt = 0;
        int ok = 1;
        for (int i = 0; i < s.length(); i++) {
            if(i == 0){
                if(s.charAt(0) != 'A')ok = 0;
            }else if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            }
        }

        if(s.charAt(s.length() - 1) == 'C')ok = 0;
        if(cnt == 0)ok = 0;

        if(ok == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }




} public class Main {

    static int N;
    static int M;
    static int A;
    static long B;
    static long C;
//    static int[][] map;
    static int min = 9999999;

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

        String s = scanner.nextLine();

        int cnt = 0;
        int ok = 1;
        for (int i = 0; i < s.length(); i++) {
            if(i == 0){
                if(s.charAt(0) != 'A')ok = 0;
            }else if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            }
        }

        if(s.charAt(s.length() - 1) == 'C')ok = 0;
        if(cnt == 0)ok = 0;

        if(ok == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }




} Main
import java.util.*;

/**
 * Created by Santa.
 */
public class Main {

    static int N;
    static int M;
    static int A;
    static long B;
    static long C;
//    static int[][] map;
    static int min = 9999999;

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

        String s = scanner.nextLine();

        int cnt = 0;
        int ok = 1;
        for (int i = 0; i < s.length(); i++) {
            if(i == 0){
                if(s.charAt(0) != 'A')ok = 0;
            }else if(i == 1){
                if(s.charAt(1) == 'C')ok = 0;
                if(s.charAt(1) == 'A')ok = 0;
                String temp  = String.valueOf(s.charAt(i));

                if(temp.equals(temp.toUpperCase()))ok = 0;

            }else{
                String temp  = String.valueOf(s.charAt(i));



                if(s.charAt(i) == 'C'){
                    if(cnt == 1)ok = 0;
                    cnt = 1;
                }else{
                    if(temp.equals(temp.toUpperCase()))ok = 0;
                }
            }
        }

        if(s.charAt(s.length() - 1) == 'C')ok = 0;
        if(cnt == 0)ok = 0;

        if(ok == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }




}

