from collections import Counter S = input() C = Counter(S) print(C["Y"], C["E"], C["A"], C["H"], C["!"])