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