#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 bool found = false; const char * t = "hackerrank"; int i = 0; int n = 10; for (auto c:s) { if (c==t[i]) { if (i==n-1) { found=true; break; } i++; } } cout << (found ? "YES" : "NO") << endl; } return 0; }