n = int(input())
s = []
for i in range(n):
    s.append(input())
#s = list(map(int, input().split()))
a =0
b=0
c=0
d=0
for i in range(n):
    if s[i] == "AC":
        a += 1
    elif s[i] == "WA":
        b += 1
    elif s[i] == "TLE":
        c += 1
    elif s[i] == "RE":
        d += 1

print("AC ×", a)
print("WA ×", b)
print("TLE ×", c)
print("RE ×", d)