a=int(input())
b=[input() for i in range(a)]
print("AC × {}".format(b.count("AC")))
print("WA × {}".format(b.count("WA")))
print("TLE × {}".format(b.count("TLE")))
print("RE × {}".format(b.count("RE")))