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(cAC))
print("WA×{}".format(cWA))
print("TLE×{}".format(cTLE))
print("RE×{}".format(cRE))