count = {"Y":0, "E":0, "A":0, "H":0, "!":0} s = input() for a in s: try: count[a] += 1 except: continue print(count["Y"], count["E"], count["A"], count["H"], count["!"])