n = int(input())
result_dict = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(n):
    s = input()
    result_dict[s] += 1
 
print('AC'+' × '+str(result_dict['AC']))
print('WA'+' × '+str(result_dict['WA']))
print('TLE'+' × '+str(result_dict['TLE']))
print('RE'+' × '+str(result_dict['RE']))