n = int(input())
s = [input() for _ in range(n)]
ac, wa, tle, re = 0, 0, 0, 0

for i in range(n):
    if "AC" in s[i]:
        ac += 1
    elif "WA" in s[i]:
        wa += 1
    elif "TLE" in s[i]:
        tle += 1
    elif "RE" in s[i]:
        re += 1
print("AC × ",ac)
print("WA × ",wa)
print("TLE × ",tle)
print("RE × ",re)