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

#define rep(i, n) for(int i = 0; i < n; ++i)

int main() {
	int h[2];
	int k[2];
	int a, b, c, d;

	cin >> h[0] >> h[1] >> k[0] >> k[1] >> a >> b >> c >> d;

	int hiroshi = h[0] * a + h[0] / 10 * c + h[1] * b + h[1] / 20 * d;
	int kenjiro = k[0] * a + k[0] / 10 * c + k[1] * b + k[1] / 20 * d;

	if (hiroshi == kenjiro) cout << "even" << endl;
	else (hiroshi > kenjiro) ? cout << "hiroshi" << endl : cout << "kenjiro" << endl;
}

