N = int(input())
c0=[]
c1=[]
c2=[]
c3=[]
for i in range(N):
    S = input()
    if S == "AC":
        c0.append(S)
    elif S == "WA":
        c1.append(S)
    elif S == "TLE":
        c2.append(S)
    elif S == "RE":
        c3.append(S)

print("AC","×",len(c0))
print("WA","×",len(c1))
print("TLE","×",len(c2))
print("RE","×",len(c3))
