import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
            String str=scan.next();
            if(str.charAt(0)!='A'){
                System.out.println("WA");
                return;
            }
            else{
                int Ccount=0;
                int i;
                int length=str.length();
                for(i=2;i<length-1;i++){
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                }
                if(Ccount==0){
                    System.out.println("WA");
                    return ;
                }
                int big=0;
                for(i=0;i<length;i++){
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                }
            }
            System.out.println("AC");
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
            String str=scan.next();
            if(str.charAt(0)!='A'){
                System.out.println("WA");
                return;
            }
            else{
                int Ccount=0;
                int i;
                int length=str.length();
                for(i=2;i<length-1;i++){
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                }
                if(Ccount==0){
                    System.out.println("WA");
                    return ;
                }
                int big=0;
                for(i=0;i<length;i++){
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                }
            }
            System.out.println("AC");
    }
} Main public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
            String str=scan.next();
            if(str.charAt(0)!='A'){
                System.out.println("WA");
                return;
            }
            else{
                int Ccount=0;
                int i;
                int length=str.length();
                for(i=2;i<length-1;i++){
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                }
                if(Ccount==0){
                    System.out.println("WA");
                    return ;
                }
                int big=0;
                for(i=0;i<length;i++){
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                }
            }
            System.out.println("AC");
    } main {
        Scanner scan=new Scanner(System.in);
            String str=scan.next();
            if(str.charAt(0)!='A'){
                System.out.println("WA");
                return;
            }
            else{
                int Ccount=0;
                int i;
                int length=str.length();
                for(i=2;i<length-1;i++){
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                }
                if(Ccount==0){
                    System.out.println("WA");
                    return ;
                }
                int big=0;
                for(i=0;i<length;i++){
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                }
            }
            System.out.println("AC");
    } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) String str=scan.next(); str scan.next() scan.next scan if(str.charAt(0)!='A'){
                System.out.println("WA");
                return;
            }
            else{
                int Ccount=0;
                int i;
                int length=str.length();
                for(i=2;i<length-1;i++){
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                }
                if(Ccount==0){
                    System.out.println("WA");
                    return ;
                }
                int big=0;
                for(i=0;i<length;i++){
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                }
            } str.charAt(0)!='A' str.charAt(0) str.charAt str 0 'A' {
                System.out.println("WA");
                return;
            } System.out.println("WA") System.out.println System.out System System.out "WA" return; {
                int Ccount=0;
                int i;
                int length=str.length();
                for(i=2;i<length-1;i++){
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                }
                if(Ccount==0){
                    System.out.println("WA");
                    return ;
                }
                int big=0;
                for(i=0;i<length;i++){
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                }
            } int Ccount=0; Ccount 0 int i; i int length=str.length(); length str.length() str.length str for(i=2;i<length-1;i++){
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                } i=2; i=2 i 2 i<length-1 i length-1 length 1 i++ i++ i {
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                } {
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                } if(str.charAt(i)=='C'){
                        Ccount++;
                    } str.charAt(i)=='C' str.charAt(i) str.charAt str i 'C' {
                        Ccount++;
                    } Ccount++ Ccount if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    } Ccount>1 Ccount 1 {
                        System.out.println("WA");
                        return ;
                    } System.out.println("WA") System.out.println System.out System System.out "WA" return ; if(Ccount==0){
                    System.out.println("WA");
                    return ;
                } Ccount==0 Ccount 0 {
                    System.out.println("WA");
                    return ;
                } System.out.println("WA") System.out.println System.out System System.out "WA" return ; int big=0; big 0 for(i=0;i<length;i++){
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                } i=0; i=0 i 0 i<length i length i++ i++ i {
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                } {
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                } if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    } Character.isUpperCase(str.charAt(i)) Character.isUpperCase Character str.charAt(i) str.charAt str i {
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    } big++ big if(big>2){
                            System.out.println("WA");
                            return ;
                        } big>2 big 2 {
                            System.out.println("WA");
                            return ;
                        } System.out.println("WA") System.out.println System.out System System.out "WA" return ; System.out.println("AC") System.out.println System.out System System.out "AC" String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
            String str=scan.next();
            if(str.charAt(0)!='A'){
                System.out.println("WA");
                return;
            }
            else{
                int Ccount=0;
                int i;
                int length=str.length();
                for(i=2;i<length-1;i++){
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                }
                if(Ccount==0){
                    System.out.println("WA");
                    return ;
                }
                int big=0;
                for(i=0;i<length;i++){
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                }
            }
            System.out.println("AC");
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
            String str=scan.next();
            if(str.charAt(0)!='A'){
                System.out.println("WA");
                return;
            }
            else{
                int Ccount=0;
                int i;
                int length=str.length();
                for(i=2;i<length-1;i++){
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                }
                if(Ccount==0){
                    System.out.println("WA");
                    return ;
                }
                int big=0;
                for(i=0;i<length;i++){
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                }
            }
            System.out.println("AC");
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
            String str=scan.next();
            if(str.charAt(0)!='A'){
                System.out.println("WA");
                return;
            }
            else{
                int Ccount=0;
                int i;
                int length=str.length();
                for(i=2;i<length-1;i++){
                    if(str.charAt(i)=='C'){
                        Ccount++;
                    }
                    if(Ccount>1){
                        System.out.println("WA");
                        return ;
                    }
                }
                if(Ccount==0){
                    System.out.println("WA");
                    return ;
                }
                int big=0;
                for(i=0;i<length;i++){
                    if(Character.isUpperCase(str.charAt(i))){
                        big++;
                        if(big>2){
                            System.out.println("WA");
                            return ;
                        }
                    }
                }
            }
            System.out.println("AC");
    }
}