n=int(input())

countAC=0
countWA=0
countTLE=0
countRE=0

for i in range(n):
    s=input()
    if s=="AC":
        countAC += 1
    elif s=="WA":
        countWA += 1
    elif s=="TLE":
        countTLE += 1
    else:
        countRE += 1

print("AC × " + str(countAC))
print("WA × " + str(countWA))
print("TLE × " + str(countTLE))
print("RE × " + str(countRE))