N = int(input())
a = 0
b = 0
c = 0
d = 0
for n in range(N):
    s = input()
    if s == 'AC':
        a += 1
    if s == 'WA':
        b += 1
    if s == 'TLE':
        c += 1
    if s == 'RE':
        d += 1
print('AC × {}'.format(a))
print('WA × {}'.format(b))
print('TLE × {}'.format(c))
print('RE × {}'.format(d))