n = int(input())
for i in range(n):
    print(input().replace("Hoshino","Hoshina"))

""" n = int(input())
for i in range(n):
    # 一度にlist(map(int,input().split()))しようとすると1単語時にエラー
    S = input()
    string = [t for t in S.split()]
    for word in string:
        if word=="Hoshino":
            word = "Hoshina"
        elif word=="hoshino":
            word = "hoshina"
        print(word,end=" ")
    print("") """
