import java.util.*;
import java.math.*;
import java.io.*;
import java.lang.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String _s = s.toLowerCase();
        boolean f = (s.charAt(0) == 'A');
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'C'){
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            }else{
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            }
        }
        f = f & (cnt == 1);
        System.out.println(f?"AC":"WA");
        sc.close();
    }
}

class io{
    public static void br(){
        System.out.println("");
    }

    public static void YesNo(boolean f) {
        System.out.println(f?"Yes":"No");
    }
    public static void YESNO(boolean f) {
        System.out.println(f?"YES":"NO");
    }

}

class Algo{
    public static boolean isOdd(int n){
        return n % 2 == 1;
    }
    public static boolean isEven(int n){
        return n % 2 == 0;
    }


}
 import java.util.*; util.* java import java.math.*; math.* java import java.io.*; io.* 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();
        String _s = s.toLowerCase();
        boolean f = (s.charAt(0) == 'A');
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'C'){
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            }else{
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            }
        }
        f = f & (cnt == 1);
        System.out.println(f?"AC":"WA");
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String _s = s.toLowerCase();
        boolean f = (s.charAt(0) == 'A');
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'C'){
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            }else{
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            }
        }
        f = f & (cnt == 1);
        System.out.println(f?"AC":"WA");
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String _s = s.toLowerCase();
        boolean f = (s.charAt(0) == 'A');
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'C'){
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            }else{
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            }
        }
        f = f & (cnt == 1);
        System.out.println(f?"AC":"WA");
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String _s = s.toLowerCase(); _s s.toLowerCase() s.toLowerCase s boolean f = (s.charAt(0) == 'A'); f (s.charAt(0) == 'A') s.charAt(0) s.charAt s 0 'A' int cnt = 0; cnt 0 for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'C'){
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            }else{
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if(s.charAt(i) == 'C'){
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            }else{
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            }
        } {
            if(s.charAt(i) == 'C'){
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            }else{
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            }
        } if(s.charAt(i) == 'C'){
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            }else{
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            } if(i <= 1 || i == s.length()-1){
                    f = false;
                } i <= 1 || i == s.length()-1 i <= 1 i 1 i == s.length()-1 i s.length()-1 s.length() s.length s 1 {
                    f = false;
                } f = false f false cnt++ cnt {
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            } if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                } i != 0 i 0 {
                    f = f & (s.charAt(i) == _s.charAt(i));
                } f = f & (s.charAt(i) == _s.charAt(i)) f f & (s.charAt(i) == _s.charAt(i)) f (s.charAt(i) == _s.charAt(i)) s.charAt(i) s.charAt s i _s.charAt(i) _s.charAt _s i f = f & (cnt == 1) f f & (cnt == 1) f (cnt == 1) cnt 1 System.out.println(f?"AC":"WA") System.out.println System.out System System.out f?"AC":"WA" f "AC" "WA" sc.close() sc.close sc String[] args args class io{
    public static void br(){
        System.out.println("");
    }

    public static void YesNo(boolean f) {
        System.out.println(f?"Yes":"No");
    }
    public static void YESNO(boolean f) {
        System.out.println(f?"YES":"NO");
    }

} io public static void br(){
        System.out.println("");
    } br {
        System.out.println("");
    } System.out.println("") System.out.println System.out System System.out "" public static void YesNo(boolean f) {
        System.out.println(f?"Yes":"No");
    } YesNo {
        System.out.println(f?"Yes":"No");
    } System.out.println(f?"Yes":"No") System.out.println System.out System System.out f?"Yes":"No" f "Yes" "No" boolean f f public static void YESNO(boolean f) {
        System.out.println(f?"YES":"NO");
    } YESNO {
        System.out.println(f?"YES":"NO");
    } System.out.println(f?"YES":"NO") System.out.println System.out System System.out f?"YES":"NO" f "YES" "NO" boolean f f class Algo{
    public static boolean isOdd(int n){
        return n % 2 == 1;
    }
    public static boolean isEven(int n){
        return n % 2 == 0;
    }


} Algo public static boolean isOdd(int n){
        return n % 2 == 1;
    } isOdd {
        return n % 2 == 1;
    } return n % 2 == 1; n % 2 == 1 n % 2 n 2 1 int n n public static boolean isEven(int n){
        return n % 2 == 0;
    } isEven {
        return n % 2 == 0;
    } return n % 2 == 0; n % 2 == 0 n % 2 n 2 0 int n n public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String _s = s.toLowerCase();
        boolean f = (s.charAt(0) == 'A');
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'C'){
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            }else{
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            }
        }
        f = f & (cnt == 1);
        System.out.println(f?"AC":"WA");
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String _s = s.toLowerCase();
        boolean f = (s.charAt(0) == 'A');
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'C'){
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            }else{
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            }
        }
        f = f & (cnt == 1);
        System.out.println(f?"AC":"WA");
        sc.close();
    }
} Main
import java.util.*;
import java.math.*;
import java.io.*;
import java.lang.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String _s = s.toLowerCase();
        boolean f = (s.charAt(0) == 'A');
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'C'){
                if(i <= 1 || i == s.length()-1){
                    f = false;
                }
                cnt++;
            }else{
                if(i != 0){
                    f = f & (s.charAt(i) == _s.charAt(i));
                }
            }
        }
        f = f & (cnt == 1);
        System.out.println(f?"AC":"WA");
        sc.close();
    }
}

class io{
    public static void br(){
        System.out.println("");
    }

    public static void YesNo(boolean f) {
        System.out.println(f?"Yes":"No");
    }
    public static void YESNO(boolean f) {
        System.out.println(f?"YES":"NO");
    }

}

class Algo{
    public static boolean isOdd(int n){
        return n % 2 == 1;
    }
    public static boolean isEven(int n){
        return n % 2 == 0;
    }


}

