import java.io.*; import java.util.*; class Main { int a, b, c, d; int getScore( int iw, int ym ) { return a*iw + b*ym + c*(iw/10) + d*(ym/20); } void solve(){ Scanner sc = new Scanner(System.in); int h1 = sc.nextInt(), h2 = sc.nextInt(); int k1 = sc.nextInt(), k2 = sc.nextInt(); a = sc.nextInt();@b = sc.nextInt();@c = sc.nextInt();@d = sc.nextInt(); int hp = getScore( h1, h2 ); int kp = getScore( k1, k2 ); if ( hp > kp ) System.out.println("hiroshi"); else if ( hp < kp ) System.out.println("kenjiro"); else System.out.println("even"); } public static void main(String[] a) {new Main().solve(); } }