N = int(input())
  
inputList = []
countAC=0
countWA=0
countTLE=0
countRE=0
for i in range(0,N):
        val = input()
#       inputList.append(val)
        if val=="AC":
                countAC=countAC+1
        elif val=="WA":
                countWA=countWA+1
        elif val=="TLE":
                countTLE=countTLE+1
        elif val=="RE":
                countRE=countRE+1
        else:
                break
print("AC × "+str(countAC))
print("WA × "+str(countWA))
print("TLE × "+str(countTLE))
print("RE × "+str(countRE))