n = int(input())
datasets=[None]*n
for i in range(n):
  datasets[i] = input()

def rep(a):
  if a == "Hoshino":
    return "Hoshina"
  else:
    return a

for data in datasets:
  words = data.split(" ")
  words = list(map(rep,words))
  print(" ".join(words))