s=eval(input())

from collections import Counter

ans='AC'

if s[0]=='A' and Counter(s[2:-1]).get('C')==1:

  for x in sorted(s)[2:]:

    if x.isupper():

      ans='WA'

      break

else:

  ans='WA'

print(ans)

s=eval(input())

if s[0]=='A' and 'C' in s[2:-1] and s[1:].replace('C','',1).islower():

  print('AC')

else:

  print('WA')
s = eval(input())
from collections import Counter

ans = "AC"
if s[0] == "A" and Counter(s[2:-1]).get("C") == 1:
    for x in sorted(s)[2:]:
        if x.isupper():
            ans = "WA"
            break
else:
    ans = "WA"
print(ans)

s = eval(input())
if s[0] == "A" and "C" in s[2:-1] and s[1:].replace("C", "", 1).islower():
    print("AC")
else:
    print("WA")

-from collections import Counter - -ans = "AC" -if s[0] == "A" and Counter(s[2:-1]).get("C") == 1: -    for x in sorted(s)[2:]: -        if x.isupper(): -            ans = "WA" -            break +if s[0] == "A" and "C" in s[2:-1] and s[1:].replace("C", "", 1).islower(): +    print("AC") -    ans = "WA" -print(ans) +    print("WA")