N = int(input())
S = []
for _ in range(N):
    S.append(input()) 
a = S.count('AC')
b = S.count('WA')
c = S.count('TLE')
d = S.count('RE')
print ('AC ×' + str(a))
print('WA ×' + str(b))
print('TLE ×' + str(c))
print('RE ×' + str(d))