counto = []
for _ in range(int(input())):
	s = input()
	counto.append(s)
print("AC"+" x "+str(counto.count("AC")))
print("WC"+" x "+str(counto.count("WA")))
print("TLE"+" x "+str(counto.count("TLE")))
print("RE"+" x "+str(counto.count("RE")))