n = int(input())
data = [input() for _ in range(n)]
a = data.count("AC")
b = data.count("WA")
c = data.count("TLE")
d = data.count("RE")
print("AC × " + str(a))
print("WA × " + str(b))
print("TLE × " + str(c))
print("RE × " + str(d))