import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S= sc.next();
        byte[] ascii;
        int countA=0;
        int countC=0;
        int Omoji=0;
        try{
            ascii =S.getBytes("US-ASCII");
        }catch(Exception e){
            e.printStackTrace();
            return;
        }
        int a=ascii[0];
        int c = ascii[2];
        if(a==65)countA++;
        for(int i=0;i<ascii.length;i++){
            int b=ascii[i];
            if(b>=65&&b<=90)Omoji++;
            if(b==67&&i<=ascii.length-2&&i!=1)countC++;
        }
        if(countA==1&&countC==1&&Omoji==2)System.out.println("AC");
        else System.out.println("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.next();
        byte[] ascii;
        int countA=0;
        int countC=0;
        int Omoji=0;
        try{
            ascii =S.getBytes("US-ASCII");
        }catch(Exception e){
            e.printStackTrace();
            return;
        }
        int a=ascii[0];
        int c = ascii[2];
        if(a==65)countA++;
        for(int i=0;i<ascii.length;i++){
            int b=ascii[i];
            if(b>=65&&b<=90)Omoji++;
            if(b==67&&i<=ascii.length-2&&i!=1)countC++;
        }
        if(countA==1&&countC==1&&Omoji==2)System.out.println("AC");
        else System.out.println("WA");
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S= sc.next();
        byte[] ascii;
        int countA=0;
        int countC=0;
        int Omoji=0;
        try{
            ascii =S.getBytes("US-ASCII");
        }catch(Exception e){
            e.printStackTrace();
            return;
        }
        int a=ascii[0];
        int c = ascii[2];
        if(a==65)countA++;
        for(int i=0;i<ascii.length;i++){
            int b=ascii[i];
            if(b>=65&&b<=90)Omoji++;
            if(b==67&&i<=ascii.length-2&&i!=1)countC++;
        }
        if(countA==1&&countC==1&&Omoji==2)System.out.println("AC");
        else System.out.println("WA");
    } main {
        Scanner sc = new Scanner(System.in);
        String S= sc.next();
        byte[] ascii;
        int countA=0;
        int countC=0;
        int Omoji=0;
        try{
            ascii =S.getBytes("US-ASCII");
        }catch(Exception e){
            e.printStackTrace();
            return;
        }
        int a=ascii[0];
        int c = ascii[2];
        if(a==65)countA++;
        for(int i=0;i<ascii.length;i++){
            int b=ascii[i];
            if(b>=65&&b<=90)Omoji++;
            if(b==67&&i<=ascii.length-2&&i!=1)countC++;
        }
        if(countA==1&&countC==1&&Omoji==2)System.out.println("AC");
        else System.out.println("WA");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S= sc.next(); S sc.next() sc.next sc byte[] ascii; ascii int countA=0; countA 0 int countC=0; countC 0 int Omoji=0; Omoji 0 try{
            ascii =S.getBytes("US-ASCII");
        }catch(Exception e){
            e.printStackTrace();
            return;
        } catch(Exception e){
            e.printStackTrace();
            return;
        } Exception e {
            e.printStackTrace();
            return;
        } e.printStackTrace() e.printStackTrace e return; {
            ascii =S.getBytes("US-ASCII");
        } ascii =S.getBytes("US-ASCII") ascii S.getBytes("US-ASCII") S.getBytes S "US-ASCII" int a=ascii[0]; a ascii[0] ascii 0 int c = ascii[2]; c ascii[2] ascii 2 if(a==65)countA++; a==65 a 65 countA++ countA for(int i=0;i<ascii.length;i++){
            int b=ascii[i];
            if(b>=65&&b<=90)Omoji++;
            if(b==67&&i<=ascii.length-2&&i!=1)countC++;
        } int i=0; int i=0; i 0 i<ascii.length i ascii.length ascii ascii.length i++ i++ i {
            int b=ascii[i];
            if(b>=65&&b<=90)Omoji++;
            if(b==67&&i<=ascii.length-2&&i!=1)countC++;
        } {
            int b=ascii[i];
            if(b>=65&&b<=90)Omoji++;
            if(b==67&&i<=ascii.length-2&&i!=1)countC++;
        } int b=ascii[i]; b ascii[i] ascii i if(b>=65&&b<=90)Omoji++; b>=65&&b<=90 b>=65 b 65 b<=90 b 90 Omoji++ Omoji if(b==67&&i<=ascii.length-2&&i!=1)countC++; b==67&&i<=ascii.length-2&&i!=1 b==67&&i<=ascii.length-2&&i!=1 b==67 b 67 i<=ascii.length-2 i ascii.length-2 ascii.length ascii ascii.length 2 i!=1 i 1 countC++ countC if(countA==1&&countC==1&&Omoji==2)System.out.println("AC");
        else System.out.println("WA"); countA==1&&countC==1&&Omoji==2 countA==1&&countC==1&&Omoji==2 countA==1 countA 1 countC==1 countC 1 Omoji==2 Omoji 2 System.out.println("AC") System.out.println System.out System System.out "AC" 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);
        String S= sc.next();
        byte[] ascii;
        int countA=0;
        int countC=0;
        int Omoji=0;
        try{
            ascii =S.getBytes("US-ASCII");
        }catch(Exception e){
            e.printStackTrace();
            return;
        }
        int a=ascii[0];
        int c = ascii[2];
        if(a==65)countA++;
        for(int i=0;i<ascii.length;i++){
            int b=ascii[i];
            if(b>=65&&b<=90)Omoji++;
            if(b==67&&i<=ascii.length-2&&i!=1)countC++;
        }
        if(countA==1&&countC==1&&Omoji==2)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);
        String S= sc.next();
        byte[] ascii;
        int countA=0;
        int countC=0;
        int Omoji=0;
        try{
            ascii =S.getBytes("US-ASCII");
        }catch(Exception e){
            e.printStackTrace();
            return;
        }
        int a=ascii[0];
        int c = ascii[2];
        if(a==65)countA++;
        for(int i=0;i<ascii.length;i++){
            int b=ascii[i];
            if(b>=65&&b<=90)Omoji++;
            if(b==67&&i<=ascii.length-2&&i!=1)countC++;
        }
        if(countA==1&&countC==1&&Omoji==2)System.out.println("AC");
        else System.out.println("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.next();
        byte[] ascii;
        int countA=0;
        int countC=0;
        int Omoji=0;
        try{
            ascii =S.getBytes("US-ASCII");
        }catch(Exception e){
            e.printStackTrace();
            return;
        }
        int a=ascii[0];
        int c = ascii[2];
        if(a==65)countA++;
        for(int i=0;i<ascii.length;i++){
            int b=ascii[i];
            if(b>=65&&b<=90)Omoji++;
            if(b==67&&i<=ascii.length-2&&i!=1)countC++;
        }
        if(countA==1&&countC==1&&Omoji==2)System.out.println("AC");
        else System.out.println("WA");
    }
}