# Hoshinori
# Hoshino's

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

def rep(a):
  punc = ["","'s",",",".",":",";","!","?","#","$","%","&","(",")","-","~,","-","<",">"]
  for p in punc:
    if a == "Hoshino"+p:
      return "Hoshina"+p
  return a

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