#include <bits/stdc++.h>
using namespace std;
class G802 {
 public:
  void solve(istream& in, ostream& out) {
    string s;
    in >> s;
    string heidi("heidi");
    int n = s.size(), m = heidi.size();
    for (int i = 0, j = 0; i < n; ++i) {
      if (s[i] == heidi[j]) {
        ++j;
        if (j == m) {
          out << "YES\n";
          return;
        }
      }
    }
    out << "NO\n";
  }
};
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(nullptr);
  G802 solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
