# -*- coding: utf-8 -*-

S = eval(input())



if S[0] != 'A':

    print('WA')

elif 'C' not in S[2:-1]:

    print('WA')

else:

    i = S[2:-1].find('C')

    S = S[1:2 + i] + S[2 + i + 1:]

    if not S.islower():

        print('WA')

    else:

        print('AC')

# -*- coding: utf-8 -*-

S = eval(input())



if S[0] != 'A' or 'C' not in S[2:-1]:

    print('WA')

else:

    i = S[2:-1].find('C')

    S = S[1:2 + i] + S[2 + i + 1:]

    if not S.islower():

        print('WA')

    else:

        print('AC')

# -*- coding: utf-8 -*-
S = eval(input())
if S[0] != "A":
    print("WA")
elif "C" not in S[2:-1]:
    print("WA")
else:
    i = S[2:-1].find("C")
    S = S[1 : 2 + i] + S[2 + i + 1 :]
    if not S.islower():
        print("WA")
    else:
        print("AC")

# -*- coding: utf-8 -*-
S = eval(input())
if S[0] != "A" or "C" not in S[2:-1]:
    print("WA")
else:
    i = S[2:-1].find("C")
    S = S[1 : 2 + i] + S[2 + i + 1 :]
    if not S.islower():
        print("WA")
    else:
        print("AC")

-if S[0] != "A": -    print("WA") -elif "C" not in S[2:-1]: +if S[0] != "A" or "C" not in S[2:-1]: