#!/bin/python3 import sys fixed='hackerrank' flen=len(fixed) q = int(input().strip()) for a0 in range(q): s = input().strip() # your code goes here i=0 slen=len(s) result='YES' for h in range(flen): c=fixed[h] while i=slen: result='NO' break i+=1 print(result)