# ABC104B - AcCepted

s = input().rstrip()

if (

    s[0] == "A"

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

    and s.translate(str.maketrans({"A": None, "C": None})).islower()

):

    print("AC")

else:

    print("WA")
# ABC104B - AcCepted

def main():

    S = input().rstrip()

    flags = [S[0] == "A", S[2:-1].count("C") == 1, S.translate(str.maketrans({"A": None, "C": None})).islower()]

    print(("AC" if all(flags) else "WA"))





if __name__ == "__main__":

    main()

# ABC104B - AcCepted
s = input().rstrip()
if (
    s[0] == "A"
    and s[2:-1].count("C") == 1
    and s.translate(str.maketrans({"A": None, "C": None})).islower()
):
    print("AC")
else:
    print("WA")

# ABC104B - AcCepted
def main():
    S = input().rstrip()
    flags = [
        S[0] == "A",
        S[2:-1].count("C") == 1,
        S.translate(str.maketrans({"A": None, "C": None})).islower(),
    ]
    print(("AC" if all(flags) else "WA"))


if __name__ == "__main__":
    main()

-s = input().rstrip() -if ( -    s[0] == "A" -    and s[2:-1].count("C") == 1 -    and s.translate(str.maketrans({"A": None, "C": None})).islower() -): -    print("AC") -else: -    print("WA") +def main(): +    S = input().rstrip() +    flags = [ +        S[0] == "A", +        S[2:-1].count("C") == 1, +        S.translate(str.maketrans({"A": None, "C": None})).islower(), +    ] +    print(("AC" if all(flags) else "WA")) + + +if __name__ == "__main__": +    main()