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