score = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
N = int(input())
for _ in range(N):
    result = input()
    if result == 'AC':
        score[result] += 1
    elif result == 'WA':
        score[result] += 1
    elif result == 'TLE':
        score[result] += 1
    elif result == 'RE':
        score[result] += 1
for i in score.keys():
    print(i, '×', score[i])


