import java.io.*;
import java.util.*;

class Main{
	public static void main(String[] ar)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		
		String s = br.readLine();
		int len=s.length();
		if(s.equals("AtCo"))
			out.println("AC");
		else{
		if(s.charAt(0)=='A')
		{
			int count=0,f=0,pos=0;
			for(int i=2;i<=len-2;i++)
			{
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			}
			if(count==1)
			{
				for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				}
				if(f==1)
					out.println("WA");
				else
					out.println("AC");
			}
			else
			{
				out.println("WA");
			}

		}
		else
		{
			out.println("WA");
		}
		
      	
      }
      out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main{
	public static void main(String[] ar)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		
		String s = br.readLine();
		int len=s.length();
		if(s.equals("AtCo"))
			out.println("AC");
		else{
		if(s.charAt(0)=='A')
		{
			int count=0,f=0,pos=0;
			for(int i=2;i<=len-2;i++)
			{
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			}
			if(count==1)
			{
				for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				}
				if(f==1)
					out.println("WA");
				else
					out.println("AC");
			}
			else
			{
				out.println("WA");
			}

		}
		else
		{
			out.println("WA");
		}
		
      	
      }
      out.flush();
    }
} Main public static void main(String[] ar)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		
		String s = br.readLine();
		int len=s.length();
		if(s.equals("AtCo"))
			out.println("AC");
		else{
		if(s.charAt(0)=='A')
		{
			int count=0,f=0,pos=0;
			for(int i=2;i<=len-2;i++)
			{
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			}
			if(count==1)
			{
				for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				}
				if(f==1)
					out.println("WA");
				else
					out.println("AC");
			}
			else
			{
				out.println("WA");
			}

		}
		else
		{
			out.println("WA");
		}
		
      	
      }
      out.flush();
    } main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		
		String s = br.readLine();
		int len=s.length();
		if(s.equals("AtCo"))
			out.println("AC");
		else{
		if(s.charAt(0)=='A')
		{
			int count=0,f=0,pos=0;
			for(int i=2;i<=len-2;i++)
			{
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			}
			if(count==1)
			{
				for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				}
				if(f==1)
					out.println("WA");
				else
					out.println("AC");
			}
			else
			{
				out.println("WA");
			}

		}
		else
		{
			out.println("WA");
		}
		
      	
      }
      out.flush();
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) String s = br.readLine(); s br.readLine() br.readLine br int len=s.length(); len s.length() s.length s if(s.equals("AtCo"))
			out.println("AC");
		else{
		if(s.charAt(0)=='A')
		{
			int count=0,f=0,pos=0;
			for(int i=2;i<=len-2;i++)
			{
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			}
			if(count==1)
			{
				for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				}
				if(f==1)
					out.println("WA");
				else
					out.println("AC");
			}
			else
			{
				out.println("WA");
			}

		}
		else
		{
			out.println("WA");
		}
		
      	
      } s.equals("AtCo") s.equals s "AtCo" out.println("AC") out.println out "AC" {
		if(s.charAt(0)=='A')
		{
			int count=0,f=0,pos=0;
			for(int i=2;i<=len-2;i++)
			{
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			}
			if(count==1)
			{
				for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				}
				if(f==1)
					out.println("WA");
				else
					out.println("AC");
			}
			else
			{
				out.println("WA");
			}

		}
		else
		{
			out.println("WA");
		}
		
      	
      } if(s.charAt(0)=='A')
		{
			int count=0,f=0,pos=0;
			for(int i=2;i<=len-2;i++)
			{
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			}
			if(count==1)
			{
				for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				}
				if(f==1)
					out.println("WA");
				else
					out.println("AC");
			}
			else
			{
				out.println("WA");
			}

		}
		else
		{
			out.println("WA");
		} s.charAt(0)=='A' s.charAt(0) s.charAt s 0 'A' {
			int count=0,f=0,pos=0;
			for(int i=2;i<=len-2;i++)
			{
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			}
			if(count==1)
			{
				for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				}
				if(f==1)
					out.println("WA");
				else
					out.println("AC");
			}
			else
			{
				out.println("WA");
			}

		} int count=0 count 0 f=0 f 0 pos=0; pos 0 for(int i=2;i<=len-2;i++)
			{
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			} int i=2; int i=2; i 2 i<=len-2 i len-2 len 2 i++ i++ i {
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			} {
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			} if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				} s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' {
					count++;
					pos=i;
				} count++ count pos=i pos i if(count==1)
			{
				for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				}
				if(f==1)
					out.println("WA");
				else
					out.println("AC");
			}
			else
			{
				out.println("WA");
			} count==1 count 1 {
				for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				}
				if(f==1)
					out.println("WA");
				else
					out.println("AC");
			} for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				} int i=1; int i=1; i 1 i<len i len i++ i++ i {
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				} {
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				} if(i==pos)continue; i==pos i pos continue; if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					} s.charAt(i)<97 || s.charAt(i)>122 s.charAt(i)<97 s.charAt(i) s.charAt s i 97 s.charAt(i)>122 s.charAt(i) s.charAt s i 122 {
						f=1;
						break;
					} f=1 f 1 break; if(f==1)
					out.println("WA");
				else
					out.println("AC"); f==1 f 1 out.println("WA") out.println out "WA" out.println("AC") out.println out "AC" {
				out.println("WA");
			} out.println("WA") out.println out "WA" {
			out.println("WA");
		} out.println("WA") out.println out "WA" out.flush() out.flush out String[] ar ar
import java.io.*;
import java.util.*;

class Main{
	public static void main(String[] ar)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		
		String s = br.readLine();
		int len=s.length();
		if(s.equals("AtCo"))
			out.println("AC");
		else{
		if(s.charAt(0)=='A')
		{
			int count=0,f=0,pos=0;
			for(int i=2;i<=len-2;i++)
			{
				if(s.charAt(i)=='C')
				{
					count++;
					pos=i;
				}
			}
			if(count==1)
			{
				for(int i=1;i<len;i++)
				{
					if(i==pos)continue;
					if(s.charAt(i)<97 || s.charAt(i)>122)
					{
						f=1;
						break;
					}
				}
				if(f==1)
					out.println("WA");
				else
					out.println("AC");
			}
			else
			{
				out.println("WA");
			}

		}
		else
		{
			out.println("WA");
		}
		
      	
      }
      out.flush();
    }
}