#!/usr/bin/env python
# coding: utf-8

# In[2]:


n = int(input())

L = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for i in range(n):
    s = input()
    L[s] += 1
for i in L:
    print('{} × {}'.format(i, L[i]))

