import sys

def main():
  n = int(sys.stdin.readline())
  for _ in range(n):
    line = sys.stdin.readline()
    print(line.rstrip().replace("Hoshino", "Hoshina"))

if __name__ == "__main__":
  main()