N = int(input())
J = [0, 0, 0, 0]
for i in range(N):
    S = input()
    if S == 'AC':
        J[0] += 1
    elif S == 'WA':
        J[1] += 1
    elif S == 'TLE':
        J[2] += 1
    else:
        J[3] += 1

print('AC' + ' × ' + str(J[0]))
print('WA' + ' × ' + str(J[1]))
print('TLE' + ' × ' + str(J[2]))
print('RE' + ' × ' + str(J[3]))
