N=int(input())
a=0
b=0
c=0
d=0
for i in range(N):
    if input()=="AC":
        a+=1
    elif input()=="WA":
        b+=1
    elif input()=="TLE":
        c+=1
    else:
        d+=1
print("AC ×",a)
print("WA ×",b)
print("TLE ×",c)
print("RE ×",d)