n = int(eval(input()))

for _ in range(n):

    print((input().replace("Hoshino", "Hoshina")))
n = int(input())

dataset = [input().replace("Hoshino", "Hoshina") for _ in range(n)]

print(*dataset, sep="\n")



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

n = int(input())
dataset = [input().replace("Hoshino", "Hoshina") for _ in range(n)]
print(*dataset, sep="\n")

-n = int(eval(input())) -for _ in range(n): -    print((input().replace("Hoshino", "Hoshina"))) +n = int(input()) +dataset = [input().replace("Hoshino", "Hoshina") for _ in range(n)] +print(*dataset, sep="\n")