n = int(input())  # nは入力回数
m = [input() for _ in range(n)]

print('AC × ' + str(m.count('AC')))
print('WA × ' + str(m.count('WA')))
print('TLE × ' + str(m.count('TLE')))
print('RE × ' + str(m.count('RE')))
