import java.util.*;
public class Main{
    public static void main(String[] args)throws Exception{
        Scanner sc = new Scanner(System.in);

        String s = sc.nextLine();
        int n = s.length();
        int count=0;

        if(s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(1))) {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(n-1))) {
            System.out.println("WA");
            return;
        }


        for(int i = 2;i < n-1;i++){
           // System.out.println(s.charAt(i));
            if(Character.isUpperCase(s.charAt(i))) {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            }

        }

        System.out.println(count==1?"AC":"WA");


    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args)throws Exception{
        Scanner sc = new Scanner(System.in);

        String s = sc.nextLine();
        int n = s.length();
        int count=0;

        if(s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(1))) {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(n-1))) {
            System.out.println("WA");
            return;
        }


        for(int i = 2;i < n-1;i++){
           // System.out.println(s.charAt(i));
            if(Character.isUpperCase(s.charAt(i))) {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            }

        }

        System.out.println(count==1?"AC":"WA");


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

        String s = sc.nextLine();
        int n = s.length();
        int count=0;

        if(s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(1))) {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(n-1))) {
            System.out.println("WA");
            return;
        }


        for(int i = 2;i < n-1;i++){
           // System.out.println(s.charAt(i));
            if(Character.isUpperCase(s.charAt(i))) {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            }

        }

        System.out.println(count==1?"AC":"WA");


    } main {
        Scanner sc = new Scanner(System.in);

        String s = sc.nextLine();
        int n = s.length();
        int count=0;

        if(s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(1))) {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(n-1))) {
            System.out.println("WA");
            return;
        }


        for(int i = 2;i < n-1;i++){
           // System.out.println(s.charAt(i));
            if(Character.isUpperCase(s.charAt(i))) {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            }

        }

        System.out.println(count==1?"AC":"WA");


    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int n = s.length(); n s.length() s.length s int count=0; count 0 if(s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; if(Character.isUpperCase(s.charAt(1))) {
            System.out.println("WA");
            return;
        } Character.isUpperCase(s.charAt(1)) Character.isUpperCase Character s.charAt(1) s.charAt s 1 {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; if(Character.isUpperCase(s.charAt(n-1))) {
            System.out.println("WA");
            return;
        } Character.isUpperCase(s.charAt(n-1)) Character.isUpperCase Character s.charAt(n-1) s.charAt s n-1 n 1 {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; for(int i = 2;i < n-1;i++){
           // System.out.println(s.charAt(i));
            if(Character.isUpperCase(s.charAt(i))) {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            }

        } int i = 2; int i = 2; i 2 i < n-1 i n-1 n 1 i++ i++ i {
           // System.out.println(s.charAt(i));
            if(Character.isUpperCase(s.charAt(i))) {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            }

        } {
           // System.out.println(s.charAt(i));
            if(Character.isUpperCase(s.charAt(i))) {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            }

        } if(Character.isUpperCase(s.charAt(i))) {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            } Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            } if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' count++ count {
                    System.out.println("WA");
                    return;
                } System.out.println("WA") System.out.println System.out System System.out "WA" return; System.out.println(count==1?"AC":"WA") System.out.println System.out System System.out count==1?"AC":"WA" count==1 count 1 "AC" "WA" String[] args args public class Main{
    public static void main(String[] args)throws Exception{
        Scanner sc = new Scanner(System.in);

        String s = sc.nextLine();
        int n = s.length();
        int count=0;

        if(s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(1))) {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(n-1))) {
            System.out.println("WA");
            return;
        }


        for(int i = 2;i < n-1;i++){
           // System.out.println(s.charAt(i));
            if(Character.isUpperCase(s.charAt(i))) {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            }

        }

        System.out.println(count==1?"AC":"WA");


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

        String s = sc.nextLine();
        int n = s.length();
        int count=0;

        if(s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(1))) {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(n-1))) {
            System.out.println("WA");
            return;
        }


        for(int i = 2;i < n-1;i++){
           // System.out.println(s.charAt(i));
            if(Character.isUpperCase(s.charAt(i))) {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            }

        }

        System.out.println(count==1?"AC":"WA");


    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args)throws Exception{
        Scanner sc = new Scanner(System.in);

        String s = sc.nextLine();
        int n = s.length();
        int count=0;

        if(s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(1))) {
            System.out.println("WA");
            return;
        }

        if(Character.isUpperCase(s.charAt(n-1))) {
            System.out.println("WA");
            return;
        }


        for(int i = 2;i < n-1;i++){
           // System.out.println(s.charAt(i));
            if(Character.isUpperCase(s.charAt(i))) {
                if (s.charAt(i) == 'C')
                    count++;
                else {
                    System.out.println("WA");
                    return;
                }
            }

        }

        System.out.println(count==1?"AC":"WA");


    }
}