n = int(input())
lis = [0 for i in range(4)]
mo = ["AC","WA","TLE","RE"]
for ii in range(n):
    i = input()
    if i=="AC":
        lis[0]+=1
    elif i=="WA":
        lis[1]+=1
    elif i=="TLE":
        lis[2]+=1
    elif i == "RE":
        lis[3]+=1

for i in range(4):
    tmp = "{0} × {1}".format(mo[i],lis[i])
    print(tmp)
