#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int h = 0, e = 0, i1 = 0, d = 0, i2 = 0;
  string str, ans = "";
  cin >> str;
  for (long long i = 0; i < str.length(); i++) {
    if (str[i] == 'h' && h == 0) {
      ans += str[i];
      h = 1;
    } else if (str[i] == 'e' && h == 1 && e == 0) {
      ans += str[i];
      e = 1;
    } else if (str[i] == 'i' && e == 1 && i1 == 0) {
      ans += str[i];
      i1 = 1;
    } else if (str[i] == 'd' && i1 == 1 && d == 0) {
      ans += str[i];
      d = 1;
    } else if (str[i] == 'i' && d == 1 && i2 == 0) {
      ans += str[i];
      i2 = 1;
    }
  }
  if (ans == "heidi") {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
