n = int(input())
ac = []
wa = []
tle = []
re = []
for _ in range(n):
    i = input()
    if i == "WA":
        wa.append(i)
    elif i == "AC":
        ac.append(i)
    elif i == "TLE":
        tle.append(i)
    else:
        re.append(i)

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