S = eval(input())

n =len(S)

s = S.lower()





if S[0] != 'A':

  print('WA')

  exit()

else:

  for i in range(2, n-1):

    if S[i] != 'C':

      if S[i] != s[i]:

        print('WA')

        exit()

      

if S[n-1] != s[n-1] or S[1] != s[1]:

  print('WA')

  exit()

  

if S.count('C') != 1:

  print('WA')

  exit()

  

print('AC')
s=eval(input())

n=len(s)

t=s.lower()

if s[0]=='A' and s.count('C')==1 and s[1]!='C' and s[n-1]!='C':

  cnt=0

  for i in range(n):

    if s[i]!=t[i]:

      cnt+=1

  if cnt==2:

    print('AC')

    exit()

print('WA')
S = eval(input())
n = len(S)
s = S.lower()
if S[0] != "A":
    print("WA")
    exit()
else:
    for i in range(2, n - 1):
        if S[i] != "C":
            if S[i] != s[i]:
                print("WA")
                exit()
if S[n - 1] != s[n - 1] or S[1] != s[1]:
    print("WA")
    exit()
if S.count("C") != 1:
    print("WA")
    exit()
print("AC")

s = eval(input())
n = len(s)
t = s.lower()
if s[0] == "A" and s.count("C") == 1 and s[1] != "C" and s[n - 1] != "C":
    cnt = 0
    for i in range(n):
        if s[i] != t[i]:
            cnt += 1
    if cnt == 2:
        print("AC")
        exit()
print("WA")

-S = eval(input()) -n = len(S) -s = S.lower() -if S[0] != "A": -    print("WA") -    exit() -else: -    for i in range(2, n - 1): -        if S[i] != "C": -            if S[i] != s[i]: -                print("WA") -                exit() -if S[n - 1] != s[n - 1] or S[1] != s[1]: -    print("WA") -    exit() -if S.count("C") != 1: -    print("WA") -    exit() -print("AC") +s = eval(input()) +n = len(s) +t = s.lower() +if s[0] == "A" and s.count("C") == 1 and s[1] != "C" and s[n - 1] != "C": +    cnt = 0 +    for i in range(n): +        if s[i] != t[i]: +            cnt += 1 +    if cnt == 2: +        print("AC") +        exit() +print("WA")