S = gets.chomp C = S.chars.tally C.default = 0 puts %w(Y E A H !).map { |s| C[s] }.join(' ')