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