import java.util.*;

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

        boolean a = true;
        int c = 0;

        if (S.charAt(0)!='A') {
            a = false;
        }

        if (Character.isUpperCase(S.charAt(1))) {
            a = false;
        }
       
        for (int i = 2;i < S.length()-1;i++){
            if (Character.isUpperCase(S.charAt(i))) {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            }
        }

        if (Character.isUpperCase(S.charAt(S.length()-1))) {
            a = false;
        }

        if (a && c == 1) {
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();

        boolean a = true;
        int c = 0;

        if (S.charAt(0)!='A') {
            a = false;
        }

        if (Character.isUpperCase(S.charAt(1))) {
            a = false;
        }
       
        for (int i = 2;i < S.length()-1;i++){
            if (Character.isUpperCase(S.charAt(i))) {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            }
        }

        if (Character.isUpperCase(S.charAt(S.length()-1))) {
            a = false;
        }

        if (a && c == 1) {
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
} Main public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();

        boolean a = true;
        int c = 0;

        if (S.charAt(0)!='A') {
            a = false;
        }

        if (Character.isUpperCase(S.charAt(1))) {
            a = false;
        }
       
        for (int i = 2;i < S.length()-1;i++){
            if (Character.isUpperCase(S.charAt(i))) {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            }
        }

        if (Character.isUpperCase(S.charAt(S.length()-1))) {
            a = false;
        }

        if (a && c == 1) {
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();

        boolean a = true;
        int c = 0;

        if (S.charAt(0)!='A') {
            a = false;
        }

        if (Character.isUpperCase(S.charAt(1))) {
            a = false;
        }
       
        for (int i = 2;i < S.length()-1;i++){
            if (Character.isUpperCase(S.charAt(i))) {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            }
        }

        if (Character.isUpperCase(S.charAt(S.length()-1))) {
            a = false;
        }

        if (a && c == 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 boolean a = true; a true int c = 0; c 0 if (S.charAt(0)!='A') {
            a = false;
        } S.charAt(0)!='A' S.charAt(0) S.charAt S 0 'A' {
            a = false;
        } a = false a false if (Character.isUpperCase(S.charAt(1))) {
            a = false;
        } Character.isUpperCase(S.charAt(1)) Character.isUpperCase Character S.charAt(1) S.charAt S 1 {
            a = false;
        } a = false a false for (int i = 2;i < S.length()-1;i++){
            if (Character.isUpperCase(S.charAt(i))) {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            }
        } 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 (Character.isUpperCase(S.charAt(i))) {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            }
        } {
            if (Character.isUpperCase(S.charAt(i))) {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            }
        } if (Character.isUpperCase(S.charAt(i))) {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            } Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            } if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                } S.charAt(i)=='C' S.charAt(i) S.charAt S i 'C' {
                    c++;
                } c++ c {
                    a = false;
                } a = false a false if (Character.isUpperCase(S.charAt(S.length()-1))) {
            a = false;
        } Character.isUpperCase(S.charAt(S.length()-1)) Character.isUpperCase Character S.charAt(S.length()-1) S.charAt S S.length()-1 S.length() S.length S 1 {
            a = false;
        } a = false a false if (a && c == 1) {
            System.out.println("AC");
        }else{
            System.out.println("WA");
        } a && c == 1 a c == 1 c 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 {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();

        boolean a = true;
        int c = 0;

        if (S.charAt(0)!='A') {
            a = false;
        }

        if (Character.isUpperCase(S.charAt(1))) {
            a = false;
        }
       
        for (int i = 2;i < S.length()-1;i++){
            if (Character.isUpperCase(S.charAt(i))) {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            }
        }

        if (Character.isUpperCase(S.charAt(S.length()-1))) {
            a = false;
        }

        if (a && c == 1) {
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
} public class Main {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();

        boolean a = true;
        int c = 0;

        if (S.charAt(0)!='A') {
            a = false;
        }

        if (Character.isUpperCase(S.charAt(1))) {
            a = false;
        }
       
        for (int i = 2;i < S.length()-1;i++){
            if (Character.isUpperCase(S.charAt(i))) {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            }
        }

        if (Character.isUpperCase(S.charAt(S.length()-1))) {
            a = false;
        }

        if (a && c == 1) {
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
} Main
import java.util.*;

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

        boolean a = true;
        int c = 0;

        if (S.charAt(0)!='A') {
            a = false;
        }

        if (Character.isUpperCase(S.charAt(1))) {
            a = false;
        }
       
        for (int i = 2;i < S.length()-1;i++){
            if (Character.isUpperCase(S.charAt(i))) {
                if (S.charAt(i)=='C') {
                    c++;
                }else{
                    a = false;
                }
            }
        }

        if (Character.isUpperCase(S.charAt(S.length()-1))) {
            a = false;
        }

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