n = int(input())
cnt = []
for i in range(n):
    s = input()
    cnt.append(s)
print("AC ×", cnt.count('AC'))
print("WA ×", cnt.count("WA"))
print("TLE ×", cnt.count("TLE"))
print("RE ×", cnt.count("RE"))
