#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  string paper;
  cin >> paper;
  string heidi = "heidi";
  int index = 0;
  char c = heidi[index];
  for (int i = 0; i < paper.size(); i++) {
    if (paper[i] == c) {
      index++;
    }
    if (index == 5) break;
    c = heidi[index];
  }
  if (index == heidi.length()) {
    cout << "YES" << '\n';
  } else {
    cout << "NO" << '\n';
  }
  return 0;
}
