import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;

public class Main
{
  public static long d[] = new long[123456];
  public static HashMap<Integer, ArrayList<Integer>> h = new HashMap<>();
  public static HashMap<Integer, ArrayList<Long>> hd = new HashMap<>();

  public static void main(String[] args) throws IOException
  {
    BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1);

    String s = r.readLine();

    boolean f = true;
    int z = 0;
    int w = 0;
    for(int i = 0; i < s.length(); i++)
    {
      char c = s.charAt(i);
      if(i == 0)
      {
        f = c == 'A';
      }
      if(2 <= i && i <= s.length() - 2 && c == 'C')
      {
        z++;
      }
      if(!('a' <= c && c <= 'z'))
      {
        w++;
      }
    }
    
    System.out.println(f && z == 1 && w == 2? "AC" : "WA");

  }

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.HashMap; HashMap java.util public class Main
{
  public static long d[] = new long[123456];
  public static HashMap<Integer, ArrayList<Integer>> h = new HashMap<>();
  public static HashMap<Integer, ArrayList<Long>> hd = new HashMap<>();

  public static void main(String[] args) throws IOException
  {
    BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1);

    String s = r.readLine();

    boolean f = true;
    int z = 0;
    int w = 0;
    for(int i = 0; i < s.length(); i++)
    {
      char c = s.charAt(i);
      if(i == 0)
      {
        f = c == 'A';
      }
      if(2 <= i && i <= s.length() - 2 && c == 'C')
      {
        z++;
      }
      if(!('a' <= c && c <= 'z'))
      {
        w++;
      }
    }
    
    System.out.println(f && z == 1 && w == 2? "AC" : "WA");

  }

} Main public static long d[] = new long[123456]; d new long[123456] 123456 public static HashMap<Integer, ArrayList<Integer>> h = new HashMap<>(); h new HashMap<>() public static HashMap<Integer, ArrayList<Long>> hd = new HashMap<>(); hd new HashMap<>() public static void main(String[] args) throws IOException
  {
    BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1);

    String s = r.readLine();

    boolean f = true;
    int z = 0;
    int w = 0;
    for(int i = 0; i < s.length(); i++)
    {
      char c = s.charAt(i);
      if(i == 0)
      {
        f = c == 'A';
      }
      if(2 <= i && i <= s.length() - 2 && c == 'C')
      {
        z++;
      }
      if(!('a' <= c && c <= 'z'))
      {
        w++;
      }
    }
    
    System.out.println(f && z == 1 && w == 2? "AC" : "WA");

  } main {
    BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1);

    String s = r.readLine();

    boolean f = true;
    int z = 0;
    int w = 0;
    for(int i = 0; i < s.length(); i++)
    {
      char c = s.charAt(i);
      if(i == 0)
      {
        f = c == 'A';
      }
      if(2 <= i && i <= s.length() - 2 && c == 'C')
      {
        z++;
      }
      if(!('a' <= c && c <= 'z'))
      {
        w++;
      }
    }
    
    System.out.println(f && z == 1 && w == 2? "AC" : "WA");

  } BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1); r new BufferedReader(new InputStreamReader(System.in), 1) String s = r.readLine(); s r.readLine() r.readLine r boolean f = true; f true int z = 0; z 0 int w = 0; w 0 for(int i = 0; i < s.length(); i++)
    {
      char c = s.charAt(i);
      if(i == 0)
      {
        f = c == 'A';
      }
      if(2 <= i && i <= s.length() - 2 && c == 'C')
      {
        z++;
      }
      if(!('a' <= c && c <= 'z'))
      {
        w++;
      }
    } 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(i == 0)
      {
        f = c == 'A';
      }
      if(2 <= i && i <= s.length() - 2 && c == 'C')
      {
        z++;
      }
      if(!('a' <= c && c <= 'z'))
      {
        w++;
      }
    } {
      char c = s.charAt(i);
      if(i == 0)
      {
        f = c == 'A';
      }
      if(2 <= i && i <= s.length() - 2 && c == 'C')
      {
        z++;
      }
      if(!('a' <= c && c <= 'z'))
      {
        w++;
      }
    } char c = s.charAt(i); c s.charAt(i) s.charAt s i if(i == 0)
      {
        f = c == 'A';
      } i == 0 i 0 {
        f = c == 'A';
      } f = c == 'A' f c == 'A' c 'A' if(2 <= i && i <= s.length() - 2 && c == 'C')
      {
        z++;
      } 2 <= i && i <= s.length() - 2 && c == 'C' 2 <= i && i <= s.length() - 2 && c == 'C' 2 <= i 2 i i <= s.length() - 2 i s.length() - 2 s.length() s.length s 2 c == 'C' c 'C' {
        z++;
      } z++ z if(!('a' <= c && c <= 'z'))
      {
        w++;
      } !('a' <= c && c <= 'z') ('a' <= c && c <= 'z') 'a' <= c 'a' c c <= 'z' c 'z' {
        w++;
      } w++ w System.out.println(f && z == 1 && w == 2? "AC" : "WA") System.out.println System.out System System.out f && z == 1 && w == 2? "AC" : "WA" f && z == 1 && w == 2 f && z == 1 && w == 2 f z == 1 z 1 w == 2 w 2 "AC" "WA" String[] args args public class Main
{
  public static long d[] = new long[123456];
  public static HashMap<Integer, ArrayList<Integer>> h = new HashMap<>();
  public static HashMap<Integer, ArrayList<Long>> hd = new HashMap<>();

  public static void main(String[] args) throws IOException
  {
    BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1);

    String s = r.readLine();

    boolean f = true;
    int z = 0;
    int w = 0;
    for(int i = 0; i < s.length(); i++)
    {
      char c = s.charAt(i);
      if(i == 0)
      {
        f = c == 'A';
      }
      if(2 <= i && i <= s.length() - 2 && c == 'C')
      {
        z++;
      }
      if(!('a' <= c && c <= 'z'))
      {
        w++;
      }
    }
    
    System.out.println(f && z == 1 && w == 2? "AC" : "WA");

  }

} public class Main
{
  public static long d[] = new long[123456];
  public static HashMap<Integer, ArrayList<Integer>> h = new HashMap<>();
  public static HashMap<Integer, ArrayList<Long>> hd = new HashMap<>();

  public static void main(String[] args) throws IOException
  {
    BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1);

    String s = r.readLine();

    boolean f = true;
    int z = 0;
    int w = 0;
    for(int i = 0; i < s.length(); i++)
    {
      char c = s.charAt(i);
      if(i == 0)
      {
        f = c == 'A';
      }
      if(2 <= i && i <= s.length() - 2 && c == 'C')
      {
        z++;
      }
      if(!('a' <= c && c <= 'z'))
      {
        w++;
      }
    }
    
    System.out.println(f && z == 1 && w == 2? "AC" : "WA");

  }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;

public class Main
{
  public static long d[] = new long[123456];
  public static HashMap<Integer, ArrayList<Integer>> h = new HashMap<>();
  public static HashMap<Integer, ArrayList<Long>> hd = new HashMap<>();

  public static void main(String[] args) throws IOException
  {
    BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1);

    String s = r.readLine();

    boolean f = true;
    int z = 0;
    int w = 0;
    for(int i = 0; i < s.length(); i++)
    {
      char c = s.charAt(i);
      if(i == 0)
      {
        f = c == 'A';
      }
      if(2 <= i && i <= s.length() - 2 && c == 'C')
      {
        z++;
      }
      if(!('a' <= c && c <= 'z'))
      {
        w++;
      }
    }
    
    System.out.println(f && z == 1 && w == 2? "AC" : "WA");

  }

}