L =[]

N = int(input())

for i in range(N):
    S = input()
    L.append(S)

print("AC" + " × " + str(L.count("AC")))
print("WA" + " × " + str(L.count("WA")))
print("TLE" + " × " + str(L.count("TLE")))
print("RE" + " × " + str(L.count("RE")))

