N=int(input())
result_list = ['AC', 'WA', 'TLE', 'RE']
count_list = [0, 0, 0, 0]
for i in range(N):
  S = input()
  count_list[result_list.index(S)] = count_list[result_list.index(S)] + 1

for i in range(4):
  print(result_list[i]+' × '+str(count_list[i]))