import java.util.Scanner;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Map;
import java.util.HashMap;
import static java.lang.Math.*;

public class Main
{
    String s;
    
    public static void main(String args[])
    {
	new Main().solve();
    }
    
    void solve()
    {
	in();

	out();
    }

    void in()
    {
	Scanner sc = new Scanner(System.in);
	s = sc.next();
    }

    void out()
    {
	int cnt = 0;
	for(int i = 0; i < s.length(); i++) {
	    char c = s.charAt(i);
	    if(c < 'A' || 'Z' < c) cnt++;
	}

	int sl = s.length();
	
	if(s.charAt(0) == 'A' && s.substring(2, sl - 1).indexOf("C") != -1 && sl == cnt + 2)
	    out("AC");
	else
	    out("WA");
	
    }
    
    void out(int n)
    {
	System.out.println(n);
    }

    void out(double n)
    {
	System.out.println(n);
    }

    void out(long n)
    {
	System.out.println(n);
    }
    
    void out(char c)
    {
	System.out.print(c);
    }
    
    void out(String s)
    {
	System.out.println(s);
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Map; Map java.util import java.util.HashMap; HashMap java.util import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main
{
    String s;
    
    public static void main(String args[])
    {
	new Main().solve();
    }
    
    void solve()
    {
	in();

	out();
    }

    void in()
    {
	Scanner sc = new Scanner(System.in);
	s = sc.next();
    }

    void out()
    {
	int cnt = 0;
	for(int i = 0; i < s.length(); i++) {
	    char c = s.charAt(i);
	    if(c < 'A' || 'Z' < c) cnt++;
	}

	int sl = s.length();
	
	if(s.charAt(0) == 'A' && s.substring(2, sl - 1).indexOf("C") != -1 && sl == cnt + 2)
	    out("AC");
	else
	    out("WA");
	
    }
    
    void out(int n)
    {
	System.out.println(n);
    }

    void out(double n)
    {
	System.out.println(n);
    }

    void out(long n)
    {
	System.out.println(n);
    }
    
    void out(char c)
    {
	System.out.print(c);
    }
    
    void out(String s)
    {
	System.out.println(s);
    }
} Main String s; s public static void main(String args[])
    {
	new Main().solve();
    } main {
	new Main().solve();
    } new Main().solve() new Main().solve new Main() String args[] args void solve()
    {
	in();

	out();
    } solve {
	in();

	out();
    } in() in out() out void in()
    {
	Scanner sc = new Scanner(System.in);
	s = sc.next();
    } in {
	Scanner sc = new Scanner(System.in);
	s = sc.next();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) s = sc.next() s sc.next() sc.next sc void out()
    {
	int cnt = 0;
	for(int i = 0; i < s.length(); i++) {
	    char c = s.charAt(i);
	    if(c < 'A' || 'Z' < c) cnt++;
	}

	int sl = s.length();
	
	if(s.charAt(0) == 'A' && s.substring(2, sl - 1).indexOf("C") != -1 && sl == cnt + 2)
	    out("AC");
	else
	    out("WA");
	
    } out {
	int cnt = 0;
	for(int i = 0; i < s.length(); i++) {
	    char c = s.charAt(i);
	    if(c < 'A' || 'Z' < c) cnt++;
	}

	int sl = s.length();
	
	if(s.charAt(0) == 'A' && s.substring(2, sl - 1).indexOf("C") != -1 && sl == cnt + 2)
	    out("AC");
	else
	    out("WA");
	
    } int cnt = 0; cnt 0 for(int i = 0; i < s.length(); i++) {
	    char c = s.charAt(i);
	    if(c < 'A' || 'Z' < c) cnt++;
	} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
	    char c = s.charAt(i);
	    if(c < 'A' || 'Z' < c) cnt++;
	} {
	    char c = s.charAt(i);
	    if(c < 'A' || 'Z' < c) cnt++;
	} char c = s.charAt(i); c s.charAt(i) s.charAt s i if(c < 'A' || 'Z' < c) cnt++; c < 'A' || 'Z' < c c < 'A' c 'A' 'Z' < c 'Z' c cnt++ cnt int sl = s.length(); sl s.length() s.length s if(s.charAt(0) == 'A' && s.substring(2, sl - 1).indexOf("C") != -1 && sl == cnt + 2)
	    out("AC");
	else
	    out("WA"); s.charAt(0) == 'A' && s.substring(2, sl - 1).indexOf("C") != -1 && sl == cnt + 2 s.charAt(0) == 'A' && s.substring(2, sl - 1).indexOf("C") != -1 && sl == cnt + 2 s.charAt(0) == 'A' s.charAt(0) s.charAt s 0 'A' s.substring(2, sl - 1).indexOf("C") != -1 s.substring(2, sl - 1).indexOf("C") s.substring(2, sl - 1).indexOf s.substring(2, sl - 1) s.substring s 2 sl - 1 sl 1 "C" -1 1 sl == cnt + 2 sl cnt + 2 cnt 2 out("AC") out "AC" out("WA") out "WA" void out(int n)
    {
	System.out.println(n);
    } out {
	System.out.println(n);
    } System.out.println(n) System.out.println System.out System System.out n int n n void out(double n)
    {
	System.out.println(n);
    } out {
	System.out.println(n);
    } System.out.println(n) System.out.println System.out System System.out n double n n void out(long n)
    {
	System.out.println(n);
    } out {
	System.out.println(n);
    } System.out.println(n) System.out.println System.out System System.out n long n n void out(char c)
    {
	System.out.print(c);
    } out {
	System.out.print(c);
    } System.out.print(c) System.out.print System.out System System.out c char c c void out(String s)
    {
	System.out.println(s);
    } out {
	System.out.println(s);
    } System.out.println(s) System.out.println System.out System System.out s String s s public class Main
{
    String s;
    
    public static void main(String args[])
    {
	new Main().solve();
    }
    
    void solve()
    {
	in();

	out();
    }

    void in()
    {
	Scanner sc = new Scanner(System.in);
	s = sc.next();
    }

    void out()
    {
	int cnt = 0;
	for(int i = 0; i < s.length(); i++) {
	    char c = s.charAt(i);
	    if(c < 'A' || 'Z' < c) cnt++;
	}

	int sl = s.length();
	
	if(s.charAt(0) == 'A' && s.substring(2, sl - 1).indexOf("C") != -1 && sl == cnt + 2)
	    out("AC");
	else
	    out("WA");
	
    }
    
    void out(int n)
    {
	System.out.println(n);
    }

    void out(double n)
    {
	System.out.println(n);
    }

    void out(long n)
    {
	System.out.println(n);
    }
    
    void out(char c)
    {
	System.out.print(c);
    }
    
    void out(String s)
    {
	System.out.println(s);
    }
} public class Main
{
    String s;
    
    public static void main(String args[])
    {
	new Main().solve();
    }
    
    void solve()
    {
	in();

	out();
    }

    void in()
    {
	Scanner sc = new Scanner(System.in);
	s = sc.next();
    }

    void out()
    {
	int cnt = 0;
	for(int i = 0; i < s.length(); i++) {
	    char c = s.charAt(i);
	    if(c < 'A' || 'Z' < c) cnt++;
	}

	int sl = s.length();
	
	if(s.charAt(0) == 'A' && s.substring(2, sl - 1).indexOf("C") != -1 && sl == cnt + 2)
	    out("AC");
	else
	    out("WA");
	
    }
    
    void out(int n)
    {
	System.out.println(n);
    }

    void out(double n)
    {
	System.out.println(n);
    }

    void out(long n)
    {
	System.out.println(n);
    }
    
    void out(char c)
    {
	System.out.print(c);
    }
    
    void out(String s)
    {
	System.out.println(s);
    }
} Main
import java.util.Scanner;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Map;
import java.util.HashMap;
import static java.lang.Math.*;

public class Main
{
    String s;
    
    public static void main(String args[])
    {
	new Main().solve();
    }
    
    void solve()
    {
	in();

	out();
    }

    void in()
    {
	Scanner sc = new Scanner(System.in);
	s = sc.next();
    }

    void out()
    {
	int cnt = 0;
	for(int i = 0; i < s.length(); i++) {
	    char c = s.charAt(i);
	    if(c < 'A' || 'Z' < c) cnt++;
	}

	int sl = s.length();
	
	if(s.charAt(0) == 'A' && s.substring(2, sl - 1).indexOf("C") != -1 && sl == cnt + 2)
	    out("AC");
	else
	    out("WA");
	
    }
    
    void out(int n)
    {
	System.out.println(n);
    }

    void out(double n)
    {
	System.out.println(n);
    }

    void out(long n)
    {
	System.out.println(n);
    }
    
    void out(char c)
    {
	System.out.print(c);
    }
    
    void out(String s)
    {
	System.out.println(s);
    }
}
