#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string str, s = "heidi";
  cin >> str;
  int n = str.length(), p = 0;
  for (int i = 0; i < n; i++) {
    if (str[i] == s[p]) {
      p++;
    }
  }
  p == 5 ? cout << "YES" << endl : cout << "NO" << endl;
}
