hash.keys.sort {|a, b| hash[a] <=> hash[b]}.each do |key|
  p hash[key]
end