using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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();
                if (Line.Length < 7)
                {
                    Console.WriteLine(Line);
                    continue;
                }
                for (int j = 0; j < Line.Length; j++)
                {
                    if (Line[j] == 'H')
                    {
                        if (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.WriteLine("Hoshina");
                            j += 6;
                        }
                    }
                    else
                    {
                        Console.WriteLine(Line[j]);
                    }                }
            }

        }
    }
}