N = int(input())

dic = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for _ in range(N):
    w = input()
    dic[w] += 1

print('AC ×', dic['AC'])
print('WA ×', dic['WA'])
print('TLE ×', dic['TLE'])
print('RE ×', dic['RE'])
