import java.util.*;
import java.io.*;
import java.math.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int len = s.length;
        int Ccnt = 0;
        if(s[0] != 'A'){
            System.out.println("WA");
            return;
        }
        for(int i = 1; i < len; i++){
            if(i == 1 || i == len-1){
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            }
            if(s[i] == 'C'){
                Ccnt++;    
            } else {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            }
        }
        if(Ccnt == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int len = s.length;
        int Ccnt = 0;
        if(s[0] != 'A'){
            System.out.println("WA");
            return;
        }
        for(int i = 1; i < len; i++){
            if(i == 1 || i == len-1){
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            }
            if(s[i] == 'C'){
                Ccnt++;    
            } else {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            }
        }
        if(Ccnt == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int len = s.length;
        int Ccnt = 0;
        if(s[0] != 'A'){
            System.out.println("WA");
            return;
        }
        for(int i = 1; i < len; i++){
            if(i == 1 || i == len-1){
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            }
            if(s[i] == 'C'){
                Ccnt++;    
            } else {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            }
        }
        if(Ccnt == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int len = s.length;
        int Ccnt = 0;
        if(s[0] != 'A'){
            System.out.println("WA");
            return;
        }
        for(int i = 1; i < len; i++){
            if(i == 1 || i == len-1){
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            }
            if(s[i] == 'C'){
                Ccnt++;    
            } else {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            }
        }
        if(Ccnt == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int len = s.length; len s.length s s.length int Ccnt = 0; Ccnt 0 if(s[0] != 'A'){
            System.out.println("WA");
            return;
        } s[0] != 'A' s[0] s 0 'A' {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; for(int i = 1; i < len; i++){
            if(i == 1 || i == len-1){
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            }
            if(s[i] == 'C'){
                Ccnt++;    
            } else {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            }
        } int i = 1; int i = 1; i 1 i < len i len i++ i++ i {
            if(i == 1 || i == len-1){
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            }
            if(s[i] == 'C'){
                Ccnt++;    
            } else {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            }
        } {
            if(i == 1 || i == len-1){
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            }
            if(s[i] == 'C'){
                Ccnt++;    
            } else {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            }
        } if(i == 1 || i == len-1){
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            } i == 1 || i == len-1 i == 1 i 1 i == len-1 i len-1 len 1 {
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            } if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                } s[i] == 'C' s[i] s i 'C' {
                    System.out.println("WA");
                    return;
                } System.out.println("WA") System.out.println System.out System System.out "WA" return; if(s[i] == 'C'){
                Ccnt++;    
            } else {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            } s[i] == 'C' s[i] s i 'C' {
                Ccnt++;    
            } Ccnt++ Ccnt {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            } String s1 = String.valueOf(s[i]); s1 String.valueOf(s[i]) String.valueOf String s[i] s i String s2 = String.valueOf(s[i]).toLowerCase(); s2 String.valueOf(s[i]).toLowerCase() String.valueOf(s[i]).toLowerCase String.valueOf(s[i]) String.valueOf String s[i] s i if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                } !s1.equals(s2) s1.equals(s2) s1.equals s1 s2 {
                    System.out.println("WA");
                    return;
                } System.out.println("WA") System.out.println System.out System System.out "WA" return; if(Ccnt == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        } Ccnt == 1 Ccnt 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) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int len = s.length;
        int Ccnt = 0;
        if(s[0] != 'A'){
            System.out.println("WA");
            return;
        }
        for(int i = 1; i < len; i++){
            if(i == 1 || i == len-1){
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            }
            if(s[i] == 'C'){
                Ccnt++;    
            } else {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            }
        }
        if(Ccnt == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int len = s.length;
        int Ccnt = 0;
        if(s[0] != 'A'){
            System.out.println("WA");
            return;
        }
        for(int i = 1; i < len; i++){
            if(i == 1 || i == len-1){
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            }
            if(s[i] == 'C'){
                Ccnt++;    
            } else {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            }
        }
        if(Ccnt == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
} Main
import java.util.*;
import java.io.*;
import java.math.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int len = s.length;
        int Ccnt = 0;
        if(s[0] != 'A'){
            System.out.println("WA");
            return;
        }
        for(int i = 1; i < len; i++){
            if(i == 1 || i == len-1){
                if(s[i] == 'C'){
                    System.out.println("WA");
                    return;
                }
            }
            if(s[i] == 'C'){
                Ccnt++;    
            } else {
                String s1 = String.valueOf(s[i]);
                String s2 = String.valueOf(s[i]).toLowerCase();
                if(!s1.equals(s2)){
                    System.out.println("WA");
                    return;
                }
            }
        }
        if(Ccnt == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
}