S = input().rstrip()
freq = dict()
for c in S:
  if c not in freq:
    freq[c] = 1
  else:
    freq[c] += 1
for c in 'YEAH!':
  if c not in freq:
    freq[c] = 0
print('{} {} {} {} {}'.format(freq['Y'], freq['E'], freq['A'],freq['H'], freq['!']))