N = int(input())
ans = ""
for i in range(N):
    inp = list(map(str, input().split()))
    tmp = ""
    for j in range(len(inp)):
        if inp[j] == "Hoshino":
            inp[j] = "Hoshina"
        tmp += inp[j] + " "
    if i != N-1:
        ans += tmp + "\n"
print(ans)
    