n = input()
n = int(n)
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    wk = input()
    if wk == "AC":
        ac +=1
    elif wk == "WA":
        wa += 1
    elif wk == "TLE":
        tle += 1
    else :
        re += 1
print("AC × {0}".format(ac))
print("WA × {0}".format(wa))
print("TLE × {0}".format(tle))
print("RE × {0}".format(re))
