import copy

s = list(eval(input()))

Ccnt = 0

if s[0] == 'A' :

	for i in copy.copy(s[2:-1]) :

		if i == 'C' :

			Ccnt += 1

			s.remove(i)

	s.remove(s[0])

	if Ccnt == 1 and ''.join(s) == ''.join(s).lower() :

		print('AC')

		exit()

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

Ccnt = 0

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

                print('AC')

                exit()

print('WA')
import copy

s = list(eval(input()))
Ccnt = 0
if s[0] == "A":
    for i in copy.copy(s[2:-1]):
        if i == "C":
            Ccnt += 1
            s.remove(i)
    s.remove(s[0])
    if Ccnt == 1 and "".join(s) == "".join(s).lower():
        print("AC")
        exit()
print("WA")

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

-import copy - -s = list(eval(input())) +s = eval(input()) -if s[0] == "A": -    for i in copy.copy(s[2:-1]): -        if i == "C": -            Ccnt += 1 -            s.remove(i) -    s.remove(s[0]) -    if Ccnt == 1 and "".join(s) == "".join(s).lower(): -        print("AC") -        exit() +if s[0] == "A" and s[2:-1].count("C") == 1 and s[1:].replace("C", "").islower(): +    print("AC") +    exit()