# coding: utf-8
# Here your code !
from collections import Counter

a = Counter(list(input()))
print(a['Y'],a['E'],a['A'],a['H'],a['!'])