n = int(input())

cnt_ac = 0
cnt_tle = 0
cnt_wa = 0
cnt_re = 0

for i in range(n):
    if input() == "AC":
        cnt_ac += 1
    elif input() == "TLE":
        cnt_tle += 1
    elif input() == "WA":
        cnt_wa += 1
    elif input() == "RE":
        cnt_re += 1

print("AC ×　" + cnt_ac)
print("WA ×　" + cnt_wa)
print("TLE ×　" + cnt_tle)
print("RE ×　" + cnt_re)
