N = int(input())
l = []
for i in range(N):
    i = input()
    l.append(i)

b = l.count("AC")
c = l.count("WA")
d = l.count("TLE")
e = l.count("RE")

print("AC ×",b)
print("WA ×",c)
print("TLE ×",d)
print("RE ×",e)