from collections import Counter

S = eval(input())

def lower_s(string):

    big_c = 0

    for c in string[1:]:

        if c == "C":

            if big_c == 1:

                return False

            else:

                big_c = 1

                continue

        if c == c.upper():

            return False

    return True

if (S[0] == "A") and (Counter(S[2:-1])["C"] == 1) and lower_s(S):

    print("AC")

else:

    print("WA")

def is_u(c):

    return c == c.upper()

S = eval(input())

a = S[0] == "A"

b = S[2:-1].count("C") == 1

c = sum([int(is_u(c)) for c in S]) == 2

# print(a, b, c)

if a and b and c:

    print("AC")

else:

    print("WA")
from collections import Counter

S = eval(input())


def lower_s(string):
    big_c = 0
    for c in string[1:]:
        if c == "C":
            if big_c == 1:
                return False
            else:
                big_c = 1
                continue
        if c == c.upper():
            return False
    return True


if (S[0] == "A") and (Counter(S[2:-1])["C"] == 1) and lower_s(S):
    print("AC")
else:
    print("WA")

def is_u(c):
    return c == c.upper()


S = eval(input())
a = S[0] == "A"
b = S[2:-1].count("C") == 1
c = sum([int(is_u(c)) for c in S]) == 2
# print(a, b, c)
if a and b and c:
    print("AC")
else:
    print("WA")

-from collections import Counter +def is_u(c): +    return c == c.upper() + - - -def lower_s(string): -    big_c = 0 -    for c in string[1:]: -        if c == "C": -            if big_c == 1: -                return False -            else: -                big_c = 1 -                continue -        if c == c.upper(): -            return False -    return True - - -if (S[0] == "A") and (Counter(S[2:-1])["C"] == 1) and lower_s(S): +a = S[0] == "A" +b = S[2:-1].count("C") == 1 +c = sum([int(is_u(c)) for c in S]) == 2 +# print(a, b, c) +if a and b and c: