n = int(input())

for i in range(n):
    s = list(input().split())
    for j in range(len(s)):
        if s[j] == 'Hoshino':
            if j == len(s) - 1:
                print("Hoshina", end = "")
            else:
                print("Hoshina", end = " ")
        else:
            if j == len(s) - 1:
                print(s[j], end = "")
            else:
                print(s[j], end = " ")
    print("")