n = int(input())
s = []
for i in range(n):
    s.append(input())

#n = 6
#s = ['AC','TLE','AC','AC','WA','TLE']

result_set = {'AC','WA','TLE','RE'}
for result in result_set:
    ans = result + '　×　' + str(s.count(result))
    print(ans)
