N = int(input())
cn = [0]*4 #AC, WA, TLE, RE
for i in range(N):
  x = input()
  if x == "AC":
    cn[0] += 1
  elif x == "WA":
    cn[1] += 1
  elif x == "TLE":
    cn[2] += 1
  elif x == "RE":
    cn[3] += 1
print("AC ×",cn[0])
print("WA ×",cn[1])
print("TLE ×",cn[2])
print("RE ×",cn[3])