N = int(input())
A = [input() for i in range(N)]

print('AC × {}'.format(A.count('AC')))
print('WA × {}'.format(A.count('WA')))
print('TLE × {}'.format(A.count('TLE')))
print('RE × {}'.format(A.count('RE')))
