using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static void Main(String[] args) { int q = Convert.ToInt32(Console.ReadLine()); string target= "hackerrank"; for(int a0 = 0; a0 < q; a0++){ string s = Console.ReadLine(); int index=0; for (int i = 0; i < s.Length; i++) { if(s[i] == target[index]) { index++; } } if (index == target.Length) Console.WriteLine("YES"); else Console.WriteLine("NO"); } } }