num = int(input())
word = {"AC":0, "WA":0, "TLE":0, "RE":0}

for i in range(num):
    judge = input()
    if judge in word:
        word[str(judge)] += 1
    else:
        none
        
        
print("AC × " + str(word["AC"]))
print("WA × " + str(word["WA"]))
print("TLE × " + str(word["TLE"]))
print("RE × " + str(word["RE"]))

        
   