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