#include <bits/stdc++.h>

using namespace std;
using LL = long long;
int main()
{
    int a,b,c,d,e,f,g,h;
    cin >> a >> b >> c >> d >> e >> f >> g >> h;
    int ha = a*e + a/10*g + b*f + b/20*h;
    int ta = c*e + c/10*g + d*f + d/20*h;
    if(ha == ta){
        cout<<"even"<<endl;
    }
    if(ha > ta){
        cout<<"hiroshi"<<endl;
    }
    if(ha < ta){
        cout<<"kenjiro"<<endl;
    }
    return 0;
}

