#include using namespace std; int main(){ int q; cin >> q; for(int a0 = 0; a0 < q; a0++){ string s; cin >> s; // your code goes here string c = "hackerrank"; int n = 0; for(int i=0; i < s.size(); i++){ if(s[i] == c[n]) { n++; if(n > 9) { break; } } }; if(n == 10){ cout << "YES" << endl; } else { cout << "NO" << endl; } } return 0; }