data class Scores(val a: Int, val b: Int, val c: Int, val d: Int)
data class Tyouka(val iwana: Int, val yamame:Int){
    fun score(scores: Scores): Int {
        return iwana * scores.a + (iwana / 10) * scores.c + yamame * scores.b + (yamame / 20) * scores.d
    }
}
fun main(args:Array<String>): Unit {
    val hiroshi = readLine()!!.trim().split(' ').map(String::toInt).let{(a, b) -> Tyouka(a, b)}
    val kenjiro = readLine()!!.trim().split(' ').map(String::toInt).let{(a, b) -> Tyouka(a, b)}
    val scores = readLine()!!.trim().split(' ').map(String::toInt).let{(a, b, c, d) -> Scores(a, b, c, d)}
    println(
            when{
                hiroshi.score(scores) == kenjiro.score(scores) -> "even"
                hiroshi.score(scores) > kenjiro.score(scores) -> "hiroshi"
                else -> "kenjiro"
            }
    )
}
