n = int(input())

a = 0
w = 0
t = 0
r = 0

for _ in range(n):
    s = input()
    if s == 'AC':
        a += 1
    elif s == 'WA':
        w += 1
    elif s == 'TLE':
        t += 1
    elif s == 'RE':
        r += 1

print('AC × ' + str(a))
print('WA × ' + str(w))
print('TLE × ' + str(t))
print('RE × ' + str(r))
