import sys
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.buffer.readline().split())
def Li():return list(map(int,sys.stdin.buffer.readline().split()))

n = Ii()
ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
  ip = input()
  if ip == 'AC':
    ac += 1
  elif ip == 'WA':
    wa += 1
  elif ip == 'TLE':
    tle += 1
  else:
    re += 1
    
print('AC','×',ac)
print('WA','×',wa)
print('TLE','×',tle)
print('RE','×',re)