a=int(input())
cAC=0
cWA=0
cTLE=0
cRE=0
for i in range(a):
    b=input()
    if b=="AC":
        cAC+=1
    elif b=="WA":
        cWA=1
    elif b=="TLE":
        cTLE+=1
    elif b=="RE":
        cRE+=1
print("AC × {}".format(str(cAC)))
print("WA × {}".format(str(cWA)))
print("TLE × {}".format(str(cTLE)))
print("RE × {}".format(str(cRE)))