input_one=int(input())
array=[]
a={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(input_one):
    array.append(input())
for i in array:
    if i=="AC":
        a[i]+=1
    elif i=="WA":
        a[i]+=1
    elif i=="TLE":
        a[i]+=1
    elif i=="RE":
        a[i]+=1
    else:
        print()
print("AC ×",a["AC"])
print("WA ×",a["WA"])
print("TLE ×",a["TLE"])
print("RE ×",a["RE"])

