fish = [[], []]
point = [[], []]
fish[0] = gets.chomp.split.map(&:to_i)
fish[1] = gets.chomp.split.map(&:to_i)
point[0][0], point[1][0], point[0][1], point[1][1] = gets.chomp.split.map(&:to_i)

score = [0, 0]
2.times{|i|
    score[i] += point[0][0] *  fish[i][0]
    score[i] += point[0][1] * (fish[i][0] / 10)
    score[i] += point[1][0] *  fish[i][1]
    score[i] += point[1][1] * (fish[i][1] / 20)
}

puts (score[0] > score[1]) ? "hiroshi" : (score[0] < score[1]) ? "kenjiro" : "even"
