N = int(input())
S = []
for s in range(N):
  S.append(input())
print('AC', end=' ') 
print('×', end=' ')
print(S.count('AC'))

print('WA', end=' ') 
print('×', end=' ')
print(S.count('WA'))

print('TLE', end=' ') 
print('×', end=' ')
print(S.count('TLE'))

print('RE', end=' ') 
print('×', end=' ')
print(S.count('RE'))