n = int(input())

ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
    s = input()

    if s == "AC":
        ac += 1
    if s == "WA":
       wa += 1
    if s == "TLE":
       tle += 1
    if s == "RE":
       re += 1

a1 = "AC × " + str(ac)
a2 = "WA × " + str(wa)
a3 = "TLE × " + str(tle)
a4 = "RE × " + str(re)

print(a1)
print(a2)
print(a3)
print(a4)