from collections import Counter

N = int(input())


S = [input() for i in range(N)]

C = Counter(S)

print("AC × {}".format(C["AC"]))
print("WA × {}".format(C["WA"]))
print("TLE × {}".format(C["TLE"]))
print("RE × {}".format(C["RE"]))