#include using namespace std; int main(){ int q; cin >> q; for(int a0 = 0; a0 < q; a0++){ string s; cin >> s; string s1 = "hackerrank"; int temp = 0; for (int i = 0 ; i < s.length() ; i++){ if (temp < s1.length() && s.at(i) == s1.at(temp)){ temp++; } } if (temp != s1.length()){ cout << "NO" << endl; } else cout << "YES" << endl; } return 0; }