N=int(input())

list=[]
ac=0
wa=0
re=0
tlc=0

for i in range(N):
 list.append(input())

for i in range(N):
 if list[i]=="AC":
  ac+=1
 elif list[i]=="WA":
  wa+=1
 elif list[i]=="RE":
  re+=1
 else:
  tlc+=1

print("AC : "+str(ac))
print("WA : "+str(wa))
print("TLE : "+str(tlc))
print("RE : "+str(re))