from collections import Counter
lst = []
for i in range(int(input())):
    lst.append(input())
c = Counter(lst)
print(f"AC × {c['AC']}")
print(f"WA × {c['WA']}")
print(f"TLE × {c['TLE']}")
print(f"RE × {c['RE']}")