N=int(input())

list=[]
for i in range(N):
    list.append(str(input()))


a = list.count("AC")
b = list.count("WA")
c = list.count("TLE")
d = list.count("RE")

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