/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author Aman deep */ import java.util.*; import java.io.*; public class HackerRankInAString { public static void main(String[] args) throws IOException{ MyScanner scan = new MyScanner(); PrintWriter out = new PrintWriter(System.out,true); int q = scan.nextInt(); while(q-->0) { if(find(scan.next())) out.println("YES"); else out.println("NO"); } } static boolean find(String s) { String a = "hackerrank"; int curr = 0; int N = s.length(); for(int i=0;i