n=int(input())
s=[]
for i in range(n):
  s.append(input())
print("AC"+" × "+str(s.count("AC")))
print("WA"+" × "+str(s.count("WA")))
print("TLE"+" × "+str(s.count("TLE")))
print("RE"+" × "+str(s.count("RE")))
