n = int(input())
l = []

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