a = input()

ac = a.count('AC')
wa = a.count('WA')
tle = a.count('TLE')
re = a.count('RE')

if 1 <= ac+wa+tle+re <=100000:
    print('AC x '+ str(ac))
    print('WA x '+ str(wa))
    print('TLE x '+ str(tle))
    print('RE x '+ str(re))