n=int(input())
d=dict() 
d["AC"]=0
d["WA"]=0
d["TLE"]=0
d["RE"]=0
for i in range(n): 
  s=str(input()) 
  d[s]+=1
print("AC ×",end=" ")
print(d["AC"])
print("WA ×",end=" ")
print(d["WA"])
print("TLE ×",end=" ")
print(d["TLE"]) 
print("RE ×",end=" ") 
print(d["RE"])