import sys



input = sys.stdin.readline

MOD = 1000000007



S = input()[:-1]



S = list(S)



if S[0] == 'A':

    if 'C' in S[2:-1] and  S.count('C') == 1:

        x = []

        for i in range(1,len(S)):

            if S[i] == 'C':

                continue

            x.append(S[i])

        

        #print(x)

        if str(x).islower():

            print("AC")

            exit()



print("WA")



import sys



input = sys.stdin.readline

MOD = 1000000007



S = input()[:-1]



S = list(S)



if S[0] == 'A':

    if 'C' in S[2:-1] and  S.count('C') == 1:

        cnt = 0

        for i in range(1,len(S)):

            if S[i].isupper() :

                if  S[i] == 'C':

                    continue

            else:

                cnt+=1

        #print(x)

        if cnt == len(S)-2:

            print("AC")

            exit()



print("WA")



import sys

input = sys.stdin.readline
MOD = 1000000007
S = input()[:-1]
S = list(S)
if S[0] == "A":
    if "C" in S[2:-1] and S.count("C") == 1:
        x = []
        for i in range(1, len(S)):
            if S[i] == "C":
                continue
            x.append(S[i])
        # print(x)
        if str(x).islower():
            print("AC")
            exit()
print("WA")

import sys

input = sys.stdin.readline
MOD = 1000000007
S = input()[:-1]
S = list(S)
if S[0] == "A":
    if "C" in S[2:-1] and S.count("C") == 1:
        cnt = 0
        for i in range(1, len(S)):
            if S[i].isupper():
                if S[i] == "C":
                    continue
            else:
                cnt += 1
        # print(x)
        if cnt == len(S) - 2:
            print("AC")
            exit()
print("WA")

-        x = [] +        cnt = 0 -            if S[i] == "C": -                continue -            x.append(S[i]) +            if S[i].isupper(): +                if S[i] == "C": +                    continue +            else: +                cnt += 1 -        if str(x).islower(): +        if cnt == len(S) - 2: