S = input()
if S[0] == 'A' and S[2:-1].count('C') == 1:
    if S.replace('A', '').replace('C', '').islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

74c0cb7e19b4539ce972fd77a62bc8ad02c0fb81
<mask token>

<mask token>
if S[0] == 'A' and S[2:-1].count('C') == 1:
    if S.replace('A', '').replace('C', '').islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

S = input()
if S[0] == 'A' and S[2:-1].count('C') == 1:
    if S.replace('A', '').replace('C', '').islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')
