# Read the input string s = input().strip() # Initialize the counts for each character counts = [0, 0, 0, 0, 0] # Mapping each character to its respective index char_map = {'Y': 0, 'E': 1, 'A': 2, 'H': 3, '!': 4} # Iterate through each character in the string for c in s: idx = char_map[c] counts[idx] += 1 # Print the counts in the specified order print(' '.join(map(str, counts)))