from sys import stdin

n = int(stdin.readline().rstrip())

list = []
i = 0
for i in range(n):
  list.append(stdin.readline().rstrip())

AC = WA = TLE = RE = 0
for k in list:
  if k == 'AC':
    AC = AC + 1
  if k == 'WA':
    WA = WA + 1
  if k == 'TLE':
    TLE = TLE + 1
  if k == 'RE':
    RE = RE + 1
    
print(f'AC × {AC}')
print(f'WA × {WA}')
print(f'TLE × {TLE}')
print(f'RE × {RE}')

