import re;print(("AC"if re.match("^A[a-z]+C[a-z]+$",eval(input()))else"WA"))
import re

print((re.match(r"A[a-z]+C[a-z]+$",eval(input()))and"AC"or"WA"))
import re

print(("AC" if re.match("^A[a-z]+C[a-z]+$", eval(input())) else "WA"))

import re

print((re.match(r"A[a-z]+C[a-z]+$", eval(input())) and "AC" or "WA"))

-print(("AC" if re.match("^A[a-z]+C[a-z]+$", eval(input())) else "WA")) +print((re.match(r"A[a-z]+C[a-z]+$", eval(input())) and "AC" or "WA"))