from collections import Counter
n = int(input())
a = [input() for i in range(n)]
b = Counter(a)
b.setdefault("AC", 0)
b.setdefault("WA", 0)
b.setdefault("TLE", 0)
b.setdefault("RE", 0)
for i in b.keys():
    print(i + " x " + str(b[i]))