cnt = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(int(input()):
               s = input()
               cnt[s] += 1
for i in ['AC','WA','TLE','RE']:
               print(f'{i} x {cnt[i]}'
                     
               