n = int(input())
co = {}
co["AC"]=0
co["WA"]=0
co["TLE"]=0
co["RE"]=0
for i in range(n):
	st = input()
	co[st]+=1
print("AC ×",co["AC"])
print("WA ×",co["WA"])
print("TLE ×",co["TLE"])
print("RE ×",co["RE"])
