#include <iostream>
#include <stdio.h>

using namespace std;

int main(){
	int a,b,c,d,e,f,g,h,sum=0,suma=0;
	cin >> a>>b>>c>>d>>e>>f>>g>>h;
	if(a/10>0)sum+=(a/10)*g;
	if(b/20>0)sum+=(b/20)*h;
	if(c/10>0)suma+=(c/10)*g;
	if(d/20>0)suma+=(d/20)*h;

	sum+=(a*e)+(b*f);
	suma+=(c*e)+(d*f);

	if(sum>suma)cout<<"hiroshi"<<endl;
	else if(sum<suma)cout<<"kenjiro"<<endl;
	else cout<<"even"<<endl;
	return 0;
}
