#include #include #include #include #include #include #include int main(){ int q; scanf("%d",&q); char ch[]={'h','a','c','k','e','r','r','a','n','k'}; int pos=0,fl=-1; for(int a0 = 0; a0 < q; a0++){ char* s = (char *)malloc(512000 * sizeof(char)); scanf("%s",s); // your code goes here for(int i=0;s[i]!='\0';i++){ if(s[i]==ch[pos]) pos++; } if(pos==10) printf("YES\n"); else printf("NO\n"); pos=0; } return 0; }