a=int(input())

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

print("AC × {:d}".format(s.count("AC")))
print("WA × {:d}".format(s.count("WA")))
print("TLE × {:d}".format(s.count("TLE")))
print("RE × {:d}".format(s.count("RE")))
