n = int(input())
s = [input() for _ in range(n)]

numAC = 0
numWA = 0
numTLE = 0
numRE = 0

for i in s:
    if i == "AC":
        numAC += 1
    elif i == "WA":
        numWA += 1
    elif i == "TLE":
        numTLE += 1
    elif i == "RE":
        numRE += 1
        

print("AC × " + str(numAC))
print("WA × " + str(numWA))
print("TLE × " + str(numTLE))
print("RE × " + str(numRE))