using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using static System.Console;
using static cp;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Diagnostics;
class Program
{
    //public static cp alg;
    static void Main()
    {
        var alg = new cp();
        string s = alg.inputString();
        int cindex = 0;
        int count = 0;
        for(int a = 2; a <= s.Length - 2; a++)
        {
            if (s[a] == 'C') { count++; cindex = a; }
        }
        WriteLine(s[0] == 'A' && count == 1 && s.Substring(1, cindex - 1) == s.Substring(1, cindex - 1).ToLower()&& s.Substring(cindex+1, s.Length-cindex-1) == s.Substring(cindex + 1, s.Length - cindex - 1).ToLower()?"AC":"WA");
    }
    static int D(int n)
    {
        int count = 0;
        for (int a = 1; a <= n; a += 2)
        {
            if (n % a == 0) count++;
        }
        return count;
    }
}

class cp
{

    public cp()
    {
    }
    public int countChar(string s, string key)
    {
        return s.Length - s.Replace(key, "").Length;
    }
    public string yn(bool f, string type = null)
    {
        string str;
        if (f) str = "Yes"; else str = "No";
        if (type == "lower") return str.ToLower(); else if (type == "upper") return str.ToUpper(); else return str;
    }
    public void inputSkip()
    {
        ReadLine();
        return;
    }
    public string inputString()
    {
        return ReadLine();
    }
    public string[] inputSplitString()
    {
        return ReadLine().Split();
    }
    public string[] inputLinesString(int len)
    {
        var arr = new string[len];
        for (int a = 0; a < len; a++)
        {
            arr[a] = ReadLine();
        }
        return arr;
    }
    public string[][] inputJaggedArrayString(int len)
    {
        var arr = new string[len][];
        for (int a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split();
        }
        return arr;
    }
    public int inputInt()
    {
        return int.Parse(ReadLine());
    }
    public int[] inputSplitInt()
    {
        return ReadLine().Split().Select(i => int.Parse(i)).ToArray();
    }
    public int[] inputLinesInt(int len)
    {
        var arr = new int[len];
        for (int a = 0; a < len; a++)
        {
            arr[a] = int.Parse(ReadLine());
        }
        return arr;
    }
    public int[][] inputJaggedArrayInt(int len)
    {
        var arr = new int[len][];
        for (int a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split().Select(i => int.Parse(i)).ToArray();
        }
        return arr;
    }
    public long inputLong()
    {
        return long.Parse(ReadLine());
    }
    public long[] inputSplitLong()
    {
        return ReadLine().Split().Select(i => long.Parse(i)).ToArray();
    }
    public long[] inputLinesLong(int len)
    {
        var arr = new long[len];
        for (int a = 0; a < len; a++)
        {
            arr[a] = long.Parse(ReadLine());
        }
        return arr;
    }
    public long[][] inputJaggedArrayLong(int len)
    {
        var arr = new long[len][];
        for (int a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split().Select(i => long.Parse(i)).ToArray();
        }
        return arr;
    }
    public double inputDouble()
    {
        return double.Parse(ReadLine());
    }
    public double[] inputSplitDouble()
    {
        return ReadLine().Split().Select(i => double.Parse(i)).ToArray();
    }
    public double[] inputLinesDouble(int len)
    {
        var arr = new double[len];
        for (int a = 0; a < len; a++)
        {
            arr[a] = double.Parse(ReadLine());
        }
        return arr;
    }
    public double[][] inputJaggedArrayDouble(int len)
    {
        var arr = new double[len][];
        for (int a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split().Select(i => double.Parse(i)).ToArray();
        }
        return arr;
    }
}

Measured memory_bytes: 13140