num = int(input())
test = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(num):
    result = input()
    for j in test.keys():
        if result == j:
            test[result] += 1
for i in test:
    print(i, '×', str(test[i]))