from collections import Counter

S = eval(input())

C = Counter(S[2:-1])

patience = 1

for s in S[1:]:

    if s == "C" and patience:

        patience -= 1

        continue

    if s.isupper():

        print("WA")

        exit()



if S[0] == "A" and C["C"] == 1:

    print("AC")

else:

    print("WA")
def inpl(): return list(map(int, input().split()))

S = eval(input())

ok = False

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

    u = 0

    for s in S[1:]:

        u += s.isupper()

    if u == 1:

        ok = True

if (ok):

    print("AC")

else:

    print("WA")
from collections import Counter

S = eval(input())
C = Counter(S[2:-1])
patience = 1
for s in S[1:]:
    if s == "C" and patience:
        patience -= 1
        continue
    if s.isupper():
        print("WA")
        exit()
if S[0] == "A" and C["C"] == 1:
    print("AC")
else:
    print("WA")

def inpl():
    return list(map(int, input().split()))


S = eval(input())
ok = False
if S[0] == "A" and S[2:-1].count("C") == 1:
    u = 0
    for s in S[1:]:
        u += s.isupper()
    if u == 1:
        ok = True
if ok:
    print("AC")
else:
    print("WA")

-from collections import Counter +def inpl(): +    return list(map(int, input().split())) + -C = Counter(S[2:-1]) -patience = 1 -for s in S[1:]: -    if s == "C" and patience: -        patience -= 1 -        continue -    if s.isupper(): -        print("WA") -        exit() -if S[0] == "A" and C["C"] == 1: +ok = False +if S[0] == "A" and S[2:-1].count("C") == 1: +    u = 0 +    for s in S[1:]: +        u += s.isupper() +    if u == 1: +        ok = True +if ok: