#{print (input().replace('Hoshino','Hoshina')) for i in range(int(input()))}

for i in range(int(input())): 
  textlist = []
  output = ""
  text = input()
  while 1:
    a = text.find("Hoshino")
    if a == -1 :
      textlist.append(text[a+1:])
      break  
    else:
      textlist.append(text[:a]) 
      textlist.append("Hoshina")
      text = text[(a+7):]   
  for j in textlist:
    output += j
  print(output)
