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 hackerrank = "hackerrank"; for (int a0 = 0; a0 < q; a0++) { string s = Console.ReadLine(); if (s.Length < hackerrank.Length) { Console.WriteLine("NO"); continue; } var result = "YES"; for (int i = 0; i < hackerrank.Length; i++) { var index = s.IndexOf(hackerrank[i]); if (index < 0) { result = "NO"; break; } s = s.Substring(index + 1, s.Length - (index + 1)); } Console.WriteLine(result); } } }