str = gets.chomp.split(//).group_by{|c|c} puts ("YEAH!".split(//).map{|char|str.has_key?(char) ? str[char].length : 0}).join(' ')