#include<bits/stdc++.h>
using namespace std;

int main(){
	int h1, h2, k1, k2, a, b, c, d, hiroshi, kenjiro;
	
	cin>>h1>>h2>>k1>>k2>>a>>b>>c>>d;
	
	hiroshi = h1 * a + h2 * b;
	kenjiro = k1 * a + k2 * b;
	hiroshi += (h1 / 10) * c + (h2 / 20) * d;
	kenjiro += (k1 / 10) * c + (k2 / 20) * d;
	
	if(hiroshi == kenjiro) cout<<"even"<<endl;
	if(hiroshi < kenjiro) cout<<"kenjiro"<<endl;
	if(hiroshi > kenjiro) cout<<"hiroshi"<<endl;
	return 0;
}

