using System;
using System.Collections.Generic;
namespace V1_AizuPR
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = int.Parse(Console.ReadLine());
            for (int i = 0; i < a; i++)
            {
                string Line = Console.ReadLine();

                for (int j = 0; j < Line.Length; j++)
                {

                    if (Line[j]=='H' && Line[j + 1] == 'o' && Line[j + 2] == 's' && Line[j + 3] == 'h' && Line[j + 4] == 'i' && Line[j + 5] == 'n' && Line[j + 6] == 'o')
                    {
                        Console.Write("Hoshina");
                        j += 6;
                    }
                    else
                    {
                        Console.Write(Line[j]);
                    }
                }
                Console.WriteLine();
            }
        }
    }
}