n =int(input())
list=[]
for i in range(n):
    s = input()
    list.append(s)
print('AC × '+str(list.count('AC')))
print('WA × '+str(list.count('WA')))
print('TLE × '+str(list.count('TLE')))
print('RE × '+str(list.count('RE')))