import java.util.*;

public class Main{
    public static void main(String args[]){
        boolean ans = true;
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ccnt = 0;
        char c = 'a';
        
        for(int i=0; i<s.length(); i++){
            c = s.charAt(i);
            if(i==0){
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            }else if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            }
            if(ccnt == 0){
                ans = false;
            }
        }

        System.out.println(ans?"AC":"WA");
    }
} import java.util.*; util.* java public class Main{
    public static void main(String args[]){
        boolean ans = true;
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ccnt = 0;
        char c = 'a';
        
        for(int i=0; i<s.length(); i++){
            c = s.charAt(i);
            if(i==0){
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            }else if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            }
            if(ccnt == 0){
                ans = false;
            }
        }

        System.out.println(ans?"AC":"WA");
    }
} Main public static void main(String args[]){
        boolean ans = true;
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ccnt = 0;
        char c = 'a';
        
        for(int i=0; i<s.length(); i++){
            c = s.charAt(i);
            if(i==0){
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            }else if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            }
            if(ccnt == 0){
                ans = false;
            }
        }

        System.out.println(ans?"AC":"WA");
    } main {
        boolean ans = true;
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ccnt = 0;
        char c = 'a';
        
        for(int i=0; i<s.length(); i++){
            c = s.charAt(i);
            if(i==0){
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            }else if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            }
            if(ccnt == 0){
                ans = false;
            }
        }

        System.out.println(ans?"AC":"WA");
    } boolean ans = true; ans true Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int ccnt = 0; ccnt 0 char c = 'a'; c 'a' for(int i=0; i<s.length(); i++){
            c = s.charAt(i);
            if(i==0){
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            }else if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            }
            if(ccnt == 0){
                ans = false;
            }
        } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
            c = s.charAt(i);
            if(i==0){
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            }else if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            }
            if(ccnt == 0){
                ans = false;
            }
        } {
            c = s.charAt(i);
            if(i==0){
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            }else if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            }
            if(ccnt == 0){
                ans = false;
            }
        } c = s.charAt(i) c s.charAt(i) s.charAt s i if(i==0){
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            }else if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            } i==0 i 0 {
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            } if(c != 'A'){
                    ans = false;
                    break;
                 } c != 'A' c 'A' {
                    ans = false;
                    break;
                 } ans = false ans false break; if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            } i > 1 && i < s.length()-1 i > 1 i 1 i < s.length()-1 i s.length()-1 s.length() s.length s 1 {
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            } if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                } c == 'C' && ccnt == 0 c == 'C' c 'C' ccnt == 0 ccnt 0 {
                    ans = true;
                    ccnt++;
                } ans = true ans true ccnt++ ccnt {
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                } if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    } Character.isUpperCase(c) Character.isUpperCase Character c {
                        ans = false;
                        break;
                    } ans = false ans false break; {
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            } if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                } Character.isUpperCase(c) Character.isUpperCase Character c {
                    ans = false;
                    break;
                } ans = false ans false break; if(ccnt == 0){
                ans = false;
            } ccnt == 0 ccnt 0 {
                ans = false;
            } ans = false ans false System.out.println(ans?"AC":"WA") System.out.println System.out System System.out ans?"AC":"WA" ans "AC" "WA" String args[] args public class Main{
    public static void main(String args[]){
        boolean ans = true;
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ccnt = 0;
        char c = 'a';
        
        for(int i=0; i<s.length(); i++){
            c = s.charAt(i);
            if(i==0){
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            }else if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            }
            if(ccnt == 0){
                ans = false;
            }
        }

        System.out.println(ans?"AC":"WA");
    }
} public class Main{
    public static void main(String args[]){
        boolean ans = true;
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ccnt = 0;
        char c = 'a';
        
        for(int i=0; i<s.length(); i++){
            c = s.charAt(i);
            if(i==0){
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            }else if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            }
            if(ccnt == 0){
                ans = false;
            }
        }

        System.out.println(ans?"AC":"WA");
    }
} Main
import java.util.*;

public class Main{
    public static void main(String args[]){
        boolean ans = true;
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ccnt = 0;
        char c = 'a';
        
        for(int i=0; i<s.length(); i++){
            c = s.charAt(i);
            if(i==0){
                if(c != 'A'){
                    ans = false;
                    break;
                 }
            }else if(i > 1 && i < s.length()-1){
                if(c == 'C' && ccnt == 0){
                    ans = true;
                    ccnt++;
                }else{
                    if(Character.isUpperCase(c)){
                        ans = false;
                        break;
                    }
                }
            }else{
                if(Character.isUpperCase(c)){
                    ans = false;
                    break;
                }
            }
            if(ccnt == 0){
                ans = false;
            }
        }

        System.out.println(ans?"AC":"WA");
    }
}