import java.util.*;
import java.io.*;
 
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
 
public class Main{
    static final long mod=1000000007;
    
    public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        // int n=sc.nextInt();
        char d[]=sc.nextString().toCharArray();
        int a=-1,c=-1,cc=0,x=0;
        for(int i=0; i<d.length; i++) {
            if(d[i]=='A'){a=i;}
            if(d[i]=='C'){c=i;}
            if('Z'>=d[i])x++;
        }
        String ans="WA";
db(a,c,x);
        if(a==0 && 2<=c && c<=d.length-2 && x==2){
            ans="AC";
        }

       
        out.println(ans);
        out.flush();
    }


    static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    }  
}

class P implements Comparable<P>{
    int id, d;
    P(int  id, int d) {
        this.id=id;
        this.d=d;
    }
    public int compareTo(P p){
        return Integer.compare(d,p.d); //des
    }
}

class Reader
{ 
    private BufferedReader x;
    private StringTokenizer st;
    
    public Reader(InputStream in)
    {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    }
    public String nextString() throws IOException
    {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    }
    public int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    }
    public long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    }
    public double nextDouble() throws IOException
    {
        return Double.parseDouble(nextString());
    }
} import java.util.*; util.* java import java.io.*; io.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.util.Arrays.*; import static java.util.Arrays.*; import static java.util.Arrays.*; import static java.util.Collections.*; import static java.util.Collections.*; import static java.util.Collections.*; public class Main{
    static final long mod=1000000007;
    
    public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        // int n=sc.nextInt();
        char d[]=sc.nextString().toCharArray();
        int a=-1,c=-1,cc=0,x=0;
        for(int i=0; i<d.length; i++) {
            if(d[i]=='A'){a=i;}
            if(d[i]=='C'){c=i;}
            if('Z'>=d[i])x++;
        }
        String ans="WA";
db(a,c,x);
        if(a==0 && 2<=c && c<=d.length-2 && x==2){
            ans="AC";
        }

       
        out.println(ans);
        out.flush();
    }


    static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    }  
} Main static final long mod=1000000007; mod 1000000007 public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        // int n=sc.nextInt();
        char d[]=sc.nextString().toCharArray();
        int a=-1,c=-1,cc=0,x=0;
        for(int i=0; i<d.length; i++) {
            if(d[i]=='A'){a=i;}
            if(d[i]=='C'){c=i;}
            if('Z'>=d[i])x++;
        }
        String ans="WA";
db(a,c,x);
        if(a==0 && 2<=c && c<=d.length-2 && x==2){
            ans="AC";
        }

       
        out.println(ans);
        out.flush();
    } main {
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        // int n=sc.nextInt();
        char d[]=sc.nextString().toCharArray();
        int a=-1,c=-1,cc=0,x=0;
        for(int i=0; i<d.length; i++) {
            if(d[i]=='A'){a=i;}
            if(d[i]=='C'){c=i;}
            if('Z'>=d[i])x++;
        }
        String ans="WA";
db(a,c,x);
        if(a==0 && 2<=c && c<=d.length-2 && x==2){
            ans="AC";
        }

       
        out.println(ans);
        out.flush();
    } Reader sc = new Reader(System.in); sc new Reader(System.in) PrintWriter out=new PrintWriter(System.out); out new PrintWriter(System.out) char d[]=sc.nextString().toCharArray(); d sc.nextString().toCharArray() sc.nextString().toCharArray sc.nextString() sc.nextString sc int a=-1 a -1 1 c=-1 c -1 1 cc=0 cc 0 x=0; x 0 for(int i=0; i<d.length; i++) {
            if(d[i]=='A'){a=i;}
            if(d[i]=='C'){c=i;}
            if('Z'>=d[i])x++;
        } int i=0; int i=0; i 0 i<d.length i d.length d d.length i++ i++ i {
            if(d[i]=='A'){a=i;}
            if(d[i]=='C'){c=i;}
            if('Z'>=d[i])x++;
        } {
            if(d[i]=='A'){a=i;}
            if(d[i]=='C'){c=i;}
            if('Z'>=d[i])x++;
        } if(d[i]=='A'){a=i;} d[i]=='A' d[i] d i 'A' {a=i;} a=i a i if(d[i]=='C'){c=i;} d[i]=='C' d[i] d i 'C' {c=i;} c=i c i if('Z'>=d[i])x++; 'Z'>=d[i] 'Z' d[i] d i x++ x String ans="WA"; ans "WA" db(a,c,x) db a c x if(a==0 && 2<=c && c<=d.length-2 && x==2){
            ans="AC";
        } a==0 && 2<=c && c<=d.length-2 && x==2 c<=d.length-2 a==0 && 2<=c && c<=d.length-2 && x==2 a==0 a 0 2<=c 2 c c<=d.length-2 c d.length-2 d.length d d.length 2 x==2 x 2 {
            ans="AC";
        } ans="AC" ans "AC" out.println(ans) out.println out ans out.flush() out.flush out String[] args args static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    } db {
        System.err.println(Arrays.deepToString(os));
    } System.err.println(Arrays.deepToString(os)) System.err.println System.err System System.err Arrays.deepToString(os) Arrays.deepToString Arrays os Object... os os class P implements Comparable<P>{
    int id, d;
    P(int  id, int d) {
        this.id=id;
        this.d=d;
    }
    public int compareTo(P p){
        return Integer.compare(d,p.d); //des
    }
} P int id id d; d P(int  id, int d) {
        this.id=id;
        this.d=d;
    } P {
        this.id=id;
        this.d=d;
    } this.id=id this.id this this.id id this.d=d this.d this this.d d int  id id int d d public int compareTo(P p){
        return Integer.compare(d,p.d); //des
    } compareTo {
        return Integer.compare(d,p.d); //des
    } return Integer.compare(d,p.d); //des Integer.compare(d,p.d) Integer.compare Integer d p.d p p.d P p p Comparable class Reader
{ 
    private BufferedReader x;
    private StringTokenizer st;
    
    public Reader(InputStream in)
    {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    }
    public String nextString() throws IOException
    {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    }
    public int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    }
    public long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    }
    public double nextDouble() throws IOException
    {
        return Double.parseDouble(nextString());
    }
} Reader private BufferedReader x; x private StringTokenizer st; st public Reader(InputStream in)
    {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    } Reader {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    } x = new BufferedReader(new InputStreamReader(in)) x new BufferedReader(new InputStreamReader(in)) st = null st null InputStream in in public String nextString() throws IOException
    {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    } nextString {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    } while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine()); st==null || !st.hasMoreTokens() st==null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(x.readLine()) st new StringTokenizer(x.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    } nextInt {
        return Integer.parseInt(nextString());
    } return Integer.parseInt(nextString()); Integer.parseInt(nextString()) Integer.parseInt Integer nextString() nextString public long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    } nextLong {
        return Long.parseLong(nextString());
    } return Long.parseLong(nextString()); Long.parseLong(nextString()) Long.parseLong Long nextString() nextString public double nextDouble() throws IOException
    {
        return Double.parseDouble(nextString());
    } nextDouble {
        return Double.parseDouble(nextString());
    } return Double.parseDouble(nextString()); Double.parseDouble(nextString()) Double.parseDouble Double nextString() nextString public class Main{
    static final long mod=1000000007;
    
    public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        // int n=sc.nextInt();
        char d[]=sc.nextString().toCharArray();
        int a=-1,c=-1,cc=0,x=0;
        for(int i=0; i<d.length; i++) {
            if(d[i]=='A'){a=i;}
            if(d[i]=='C'){c=i;}
            if('Z'>=d[i])x++;
        }
        String ans="WA";
db(a,c,x);
        if(a==0 && 2<=c && c<=d.length-2 && x==2){
            ans="AC";
        }

       
        out.println(ans);
        out.flush();
    }


    static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    }  
} public class Main{
    static final long mod=1000000007;
    
    public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        // int n=sc.nextInt();
        char d[]=sc.nextString().toCharArray();
        int a=-1,c=-1,cc=0,x=0;
        for(int i=0; i<d.length; i++) {
            if(d[i]=='A'){a=i;}
            if(d[i]=='C'){c=i;}
            if('Z'>=d[i])x++;
        }
        String ans="WA";
db(a,c,x);
        if(a==0 && 2<=c && c<=d.length-2 && x==2){
            ans="AC";
        }

       
        out.println(ans);
        out.flush();
    }


    static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    }  
} Main
import java.util.*;
import java.io.*;
 
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
 
public class Main{
    static final long mod=1000000007;
    
    public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        // int n=sc.nextInt();
        char d[]=sc.nextString().toCharArray();
        int a=-1,c=-1,cc=0,x=0;
        for(int i=0; i<d.length; i++) {
            if(d[i]=='A'){a=i;}
            if(d[i]=='C'){c=i;}
            if('Z'>=d[i])x++;
        }
        String ans="WA";
db(a,c,x);
        if(a==0 && 2<=c && c<=d.length-2 && x==2){
            ans="AC";
        }

       
        out.println(ans);
        out.flush();
    }


    static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    }  
}

class P implements Comparable<P>{
    int id, d;
    P(int  id, int d) {
        this.id=id;
        this.d=d;
    }
    public int compareTo(P p){
        return Integer.compare(d,p.d); //des
    }
}

class Reader
{ 
    private BufferedReader x;
    private StringTokenizer st;
    
    public Reader(InputStream in)
    {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    }
    public String nextString() throws IOException
    {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    }
    public int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    }
    public long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    }
    public double nextDouble() throws IOException
    {
        return Double.parseDouble(nextString());
    }
}