n = int(input())
s = [input() for i in range(n)]

c_AC = 0
c_WA = 0
c_TLE = 0
c_RE = 0

for i in s:
  if i == 'AC':
    c_AC += 1
  elif i == 'WA':
    c_WA += 1
  elif i == 'TLE':
    c_TLE += 1
  else:
    c_RE += 1
    
print("AC "+"× "+str(c_AC))
print("WA "+"× "+str(c_WA))
print("TLE "+"× "+str(c_TLE))
print("RE "+"× "+str(c_RE))