N = int(input())

s_list = {"AC": 0, "TLE": 0, "WA": 0, "RE": 0}

# a, t, w, r = 0, 0, 0, 0

for i in range(N):
  s = input()
  if s == "AC":
    s_list["AC"] += 1
  elif s == "TLE":
    s_list["TLE"] += 1
  elif s == "WA":
    s_list["WA"] += 1
  else:
    s_list["RE"] += 1
    

print("AC × {}\nWA × {}\nTLE × {}\nRE × {}".format(s_list["AC"], s_list["WA"], s_list["TLE"], s_list["RE"]))