#include <bits/stdc++.h>
using namespace std;
int main() {
  long long q = 1, w, a[3], s[3], d[3] = {1000000000, 0, 0};
  for (w = 0; w < 18; w++) q *= 10;
  bool c = 0;
  for (w = 0; w < 3; w++) {
    cin >> a[w] >> s[w];
    if ((w == 2) && (d[2] > 0)) c = 1;
    if (a[w] == 0) {
      if (s[w] > 0) d[(w + 1) % 3] = q;
    } else {
      if (s[w] > 0)
        if (d[w] == q)
          d[(w + 1) % 3] = q;
        else {
          d[(w + 1) % 3] = (d[w] / a[w]) * s[w];
          d[w] %= a[w];
        }
    }
  }
  if ((((d[0] > 1000000000) && (c)) || ((d[0] == 1000000000) && (d[2] > 0))) ||
      (d[2] == q))
    cout << "Ron";
  else
    cout << "Hermione";
  return 0;
}
