n = int(raw_input())
for i in range(n):
    inp = map(str, raw_input().split())
    for j in range(len(inp)):
        if inp[j][:7] == "Hoshino":
           inp[j] = "Hoshina" + inp[j][7:]
    print " ".join(map(str, inp))
    