row = int(input())
s = [input() for i in range(row)]
ac = 0
wa = 0
tle = 0
re = 0
for j in s:
    if j == "AC":
        ac += 1
    elif j == "WA":
        wa += 1
    elif j == "TLE":
        tle += 1
    elif j == "re":
        re += 1
ac = str(ac)
wa = str(wa)
tle = str(tle)
re = str(re)
print("AC × " + ac)
print("WA × " + wa)
print("TLE × " + tle)
print("RE × " + re)