#include <bits/stdc++.h>
using namespace std;
int sf(const void *a, const void *b) {
  size_t fa = strlen((const char *)a);
  size_t fb = strlen((const char *)b);
  return (fa > fb) - (fa < fb);
}
int main() {
  string s;
  char c[6] = {"heidi"};
  int x = 0;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == c[x]) x++;
  }
  if (x >= 5)
    cout << "YES";
  else
    cout << "NO";
  cerr << (float)clock() / (float)CLOCKS_PER_SEC << " sec" << endl;
  return 0;
}
