# -*- coding: utf-8 -*-

import sys
import os

n = int(input())

for i in range(n):
    s = input().strip()

    if i == n - 1:
        print(s.replace('Hoshino', 'Hoshina'), end='')
    else:
        print(s.replace('Hoshino', 'Hoshina'))