import sys
a = []
for l in sys.stdin:
    a.append(l)
N = a[0]
count = [0]*4
for a in a[1:]:
  if a == "AC":
    count[0] += 1
  if a == "WA":
    count[1] += 1
  if a == "TLE":
    count[2] += 1
  if a == "RE":
    count[3] += 1
print("AC","×",count[0],"\n")
print("WA","×",count[1],"\n")
print("TLE","×",count[2],"\n")
print("RE","×",count[3],"\n")
  
  
