



def solve():

    s = list(eval(input()))

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

        s.remove("A")

        s.remove("C")



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

            print("AC")

            exit()



    print("WA")





if __name__ == "__main__":

    solve()

S = eval(input())



if S[0] == "A":

    if S.count("C") == 1:

        if S[2:-1].count("C") == 1:

            S = S.replace("A", "")

            S = S.replace("C", "")

            if S.islower():

                print("AC")

                exit()



print("WA")

def solve():
    s = list(eval(input()))
    if s[0] == "A" and s[2:-1].count("C") == 1:
        s.remove("A")
        s.remove("C")
        if "".join(s).islower():
            print("AC")
            exit()
    print("WA")


if __name__ == "__main__":
    solve()

S = eval(input())
if S[0] == "A":
    if S.count("C") == 1:
        if S[2:-1].count("C") == 1:
            S = S.replace("A", "")
            S = S.replace("C", "")
            if S.islower():
                print("AC")
                exit()
print("WA")

-def solve(): -    s = list(eval(input())) -    if s[0] == "A" and s[2:-1].count("C") == 1: -        s.remove("A") -        s.remove("C") -        if "".join(s).islower(): -            print("AC") -            exit() -    print("WA") - - -if __name__ == "__main__": -    solve() +S = eval(input()) +if S[0] == "A": +    if S.count("C") == 1: +        if S[2:-1].count("C") == 1: +            S = S.replace("A", "") +            S = S.replace("C", "") +            if S.islower(): +                print("AC") +                exit() +print("WA")