import string

li = list(string.ascii_lowercase)

s = list(eval(input()))

if s[0] == "A" and s[2:-1].count("C") == 1:

    s.remove("C")

    s.remove("A")

else:

    print("WA")

    exit()

if all([s[i] in li for i in range(len(s))]):

    print("AC")

    exit()

else:

    print("WA")
i = input()

if i[0]=="A"and i[2:-1].count("C")==1\

and i[1:].replace("C","c",1).islower()==True:

    print("AC")

else:print("WA")

import string

li = list(string.ascii_lowercase)
s = list(eval(input()))
if s[0] == "A" and s[2:-1].count("C") == 1:
    s.remove("C")
    s.remove("A")
else:
    print("WA")
    exit()
if all([s[i] in li for i in range(len(s))]):
    print("AC")
    exit()
else:
    print("WA")

i = input()
if (
    i[0] == "A"
    and i[2:-1].count("C") == 1
    and i[1:].replace("C", "c", 1).islower() == True
):
    print("AC")
else:
    print("WA")

-import string - -li = list(string.ascii_lowercase) -s = list(eval(input())) -if s[0] == "A" and s[2:-1].count("C") == 1: -    s.remove("C") -    s.remove("A") +i = input() +if ( +    i[0] == "A" +    and i[2:-1].count("C") == 1 +    and i[1:].replace("C", "c", 1).islower() == True +): +    print("AC") -    exit() -if all([s[i] in li for i in range(len(s))]): -    print("AC") -    exit() -else: -    print("WA")