s = input().strip() counts = [s.count(c) for c in ['Y', 'E', 'A', 'H', '!']] print(' '.join(map(str, counts)))