n = int(input())
ans = [0,0,0,0]

for i in range(n):
  tmp = input()
  if tmp == "AC":
    ans[0] += 1
  elif tmp == "WA":
    ans[1] += 1
  elif tmp == "TLE":
    ans[2] += 1
  else:
    ans[3] += 1
    
print("AC ×",ans[0])
print("WA ×",ans[1])
print("TLE ×",ans[2])
print("RE ×",ans[3])