judge = {'AC' : 0, 'WA' : 0, 'TLE' : 0, 'RE' : 0}
N = int(input())

for i in range(N):
    testcase = input()
    if testcase == 'AC':
        judge['AC'] += 1
    elif testcase == 'WA':
        judge['WA'] += 1
    elif testcase == 'TLE':
        judge['TLE'] += 1
    else:
        judge['RE'] += 1

print('AC × ' + str(judge['AC']))
print('WA × ' + str(judge['WA']))
print('TLE × ' + str(judge['TLE']))
print('RE × ' + str(judge['RE']))
