import collections
n=int(input())
data=[]
for i in range(n):
    num=input()
    data.append(num)
data=collections.Counter(data)
print("AC × {}".format(data["AC"]))
print("WA × {}".format(data["WA"]))
print("TLE × {}".format(data["TLE"]))
print("RE × {}".format(data["RE"]))