#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
using namespace std;
template <typename T1, typename T2>
bool umin(T1& x, const T2& y) {
  return (x > y ? (x = y, true) : false);
}
template <typename T1, typename T2>
bool umax(T1& x, const T2& y) {
  return (x < y ? (x = y, true) : false);
}
template <typename T>
void read(T& x) {
  char ch;
  T p = 1;
  x = 0;
  do {
    ch = getchar();
  } while (ch <= ' ');
  if (ch == '-') p = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  x *= p;
}
void read(string& x) {
  char ch;
  do {
    ch = getchar();
  } while (ch <= ' ');
  while (ch > ' ') x += ch, ch = getchar();
}
void read(char& x) {
  do {
    x = getchar();
  } while (x <= ' ');
}
template <typename T, typename... R>
void read(T& x, R&... y) {
  read(x);
  read(y...);
}
const int N = (int)1e6 + 3;
const long long mod = (long long)1e9 + 7;
const int INF = (int)1e9 + 1;
const long long LLINF = (long long)1e18 + 1;
const long double pi = (long double)acos(-1.0);
int n, m;
int main() {
  string s;
  read(s);
  int idx = 0;
  string x = "heidi";
  for (int i = (0); i < (s.length()); i++) {
    if (s[i] == x[idx]) ++idx;
    if (idx == x.length()) {
      puts("YES");
      return 0;
    }
  }
  puts("NO");
  return 0;
}
