import collections

d = collections.defaultdict(int)
for c in input():
    d[c] += 1

print(d['Y'],d['E'],d['A'],d['H'],d['!'])