#!/bin/python3 import sys def has_hackerrank(string): x = 0 for i in string: if x < len(HR) and i == HR[x]: x += 1 if x == len(HR): print("YES") else: print("NO") HR = "hackerrank" q = int(input().strip()) for a0 in range(q): s = input().strip().lower() has_hackerrank(s)