from collections import Counter



def main():



    S = list(eval(input()))

    head = S.pop(0)

    cList = []

    flag  = False

    flag1 = False

    flag2 = False



    if head == 'A':

        flag = True

    

    for i,j in enumerate(S[1:-1]):

        if j=='C':

            cList.append(i+1)

    if len(cList)==1:

        flag1=True

        S.pop(cList[0])

        

    if ''.join(S).islower():

        flag2 = True

    

    if flag and flag1 and flag2:

        print('AC')

    else:

        print('WA')





    

if __name__== "__main__":

    main() 



















from collections import Counter



def main():



    S = list(eval(input()))

    head = S.pop(0)

    count = 0

    flag  = False

    flag1 = False

    flag2 = False



    if head == 'A':

        flag = True

    

    for i in S[1:-1]:

        if i=='C':

            count += 1

    if count == 1:

        flag1=True

        S.pop(S.index('C'))

        

    if ''.join(S).islower():

        flag2 = True

    

    if flag and flag1 and flag2:

        print('AC')

    else:

        print('WA')





    

if __name__== "__main__":

    main() 



















from collections import Counter


def main():
    S = list(eval(input()))
    head = S.pop(0)
    cList = []
    flag = False
    flag1 = False
    flag2 = False
    if head == "A":
        flag = True
    for i, j in enumerate(S[1:-1]):
        if j == "C":
            cList.append(i + 1)
    if len(cList) == 1:
        flag1 = True
        S.pop(cList[0])
    if "".join(S).islower():
        flag2 = True
    if flag and flag1 and flag2:
        print("AC")
    else:
        print("WA")


if __name__ == "__main__":
    main()

from collections import Counter


def main():
    S = list(eval(input()))
    head = S.pop(0)
    count = 0
    flag = False
    flag1 = False
    flag2 = False
    if head == "A":
        flag = True
    for i in S[1:-1]:
        if i == "C":
            count += 1
    if count == 1:
        flag1 = True
        S.pop(S.index("C"))
    if "".join(S).islower():
        flag2 = True
    if flag and flag1 and flag2:
        print("AC")
    else:
        print("WA")


if __name__ == "__main__":
    main()

-    cList = [] +    count = 0 -    for i, j in enumerate(S[1:-1]): -        if j == "C": -            cList.append(i + 1) -    if len(cList) == 1: +    for i in S[1:-1]: +        if i == "C": +            count += 1 +    if count == 1: -        S.pop(cList[0]) +        S.pop(S.index("C"))