ans = {"AC": 0, "WA": 0, "TLE": 0, "RE":0}
N = int(input())
for i in range(N):
  inpt = input()
  if(inpt == "AC"):
    ans["AC"] += 1
  elif(inpt == "WA"):
    ans["WA"] += 1
  elif(inpt == "TLE"):
    ans["TLE"] += 1
  else:
    ans["RE"] += 1
for key, value in ans.items():
  print("{0} × {1}".format(key, value))