n=int(raw_input())
for i in range(n):
    w=raw_input()
    if len(w)<7:
        print w
    else:
        for i in range(len(w)-6):
            if w[i:i+7]=="Hoshino":
                w=w[:i]+"Hoshina"+w[i+7:]
        print w