#include int main() {struct shu {char str[10000]; }; struct shu b[100]; int i,n,c=0,j; char check[]="hackerrank"; scanf("%d",&n); for(i=0;i<=n-1;i++) scanf("%s",&b[i].str); for(i=0;i<=n-1;i++) {for(j=0;b[i].str[j]!='\0';j++) {if(b[i].str[j]==check[c]) c++; } if(c==10) printf("YES\n"); else printf("NO\n"); c=0; } return 0; }