lis = []
n = int(input())
for i in range(n):
    p = input()
    lis.append(p)
ac = lis.count("AC")
wa = lis.count("WA")
tle = lis.count("TLE")
re = lis.count("RE")
print("AC ×",ac)
print("WA ×",wa)
print("TLE ×",tle)
print("RE ×",re)