
n=int(input())

s = [input() for i in range(n)]

print("AC ×",s.count('AC'))
print("WA ×",s.count('WA'))
print("TLE ×",s.count('TLE'))
print("RE  ×",s.count('RE'))

                                      