s = list(eval(input()))

c = 0

if s[0] != "A":

    print("WA")

    

else:

    for a in s[2:-1]:

        if a == "C":

            c += 1

            t = a

    if c == 1:

        s.remove(s[0])

        s.remove(t)

        if "".join(s).islower():

            print("AC")

        else:

            print("WA")

    else:

        print("WA")
s = list(eval(input()))

c = 0

if s[0] != "A":

    print("WA")

else:

    for i in s[2:-1]:

        if i == "C":

            c += 1

            b = i

    if c == 1:

        s.remove(s[0])

        s.remove(b)

        if "".join(s).islower():

            print("AC")

        else:

            print("WA")

    else:

        print("WA")
s = list(eval(input()))
c = 0
if s[0] != "A":
    print("WA")
else:
    for a in s[2:-1]:
        if a == "C":
            c += 1
            t = a
    if c == 1:
        s.remove(s[0])
        s.remove(t)
        if "".join(s).islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")

s = list(eval(input()))
c = 0
if s[0] != "A":
    print("WA")
else:
    for i in s[2:-1]:
        if i == "C":
            c += 1
            b = i
    if c == 1:
        s.remove(s[0])
        s.remove(b)
        if "".join(s).islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")

-    for a in s[2:-1]: -        if a == "C": +    for i in s[2:-1]: +        if i == "C": -            t = a +            b = i -        s.remove(t) +        s.remove(b)