n=int(input()) i=0 while i < n: sentence = i ch = sentence.count("h") ca = sentence.count("a") cc = sentence.count("c") ck = sentence.count("k") ce = sentence.count("e") cr = sentence.count("r") cn = sentence.count("n") if (ch>=1 and ca>=2 and cc>=1 and ck>=2 and ce>=1 and cr>=2 and cn>=1): print("YES") else: print("NO") i+=1