using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { public static bool subsequentInString(String s1, String s2) { int i = 0; int j = 0; while (i < s1.Length && j < s2.Length) { if (s1[i] == s2[j]) { j++; } i++; } return (j == s2.Length); } static void Main(String[] args) { int q = Convert.ToInt32(Console.ReadLine()); for(int a0 = 0; a0 < q; a0++){ string s = Console.ReadLine(); // your code goes here if(subsequentInString(s,"hackerrank")) Console.WriteLine("YES"); else{ Console.WriteLine("NO"); } } } }