n = int(input())
ac, wa, tle, re = 0, 0, 0, 0

for i in range(n):
    moji = input()
    if moji == "AC":
        ac += 1
    elif moji == "WA":
        wa += 1
    elif moji == "TLE":
        tle += 1
    else:
        re += 1

print("AC ×", ac)
print("WA ×", wa)
print("TLE ×", tle)
print("RE ×", re)