#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 f = "hackerrank"; int i = 0; int j = 0; while(i < f.length() && j < s.length()) { if (f[i] == s[j]) i++; j++; } if (i == f.length()) cout<<"YES"<