#B
n = int(input())
cnt_ac = 0
cnt_wa = 0
cnt_tle = 0
cnt_re = 0
for _ in range(n):
    s = input()
    if s == 'AC':
        cnt_ac += 1
    elif s == 'TLE':
        cnt_tle += 1
    elif s == 'WA':
        cnt_wa += 1
    else:
        cnt_re += 1

print('AC × {}'.format(cnt_ac))
print('WA × {}'.format(cnt_wa))
print('TLE × {}'.format(cnt_tle))
print('RE × {}'.format(cnt_re))