using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication35
{
    class Program
    {
        static void Main()
        {
            int a = int.Parse(Console.ReadLine());
            for(int b = 0; b < a; b++)
            {
                string []g = Console.ReadLine().Split();
                for(int t = 0; t < g.Length; t++)
                {
                    if (g.Length - 1 == t)
                    {
                        if (g[t] == "Hoshino") Console.WriteLine("Hoshina");
                        else Console.WriteLine(g[t]);
                    }
                    else
                    {
                        if (g[t] == "Hoshino") Console.Write("Hoshina ");
                        else Console.Write(g[t]+' ');
                    }
                }
            }
        }
    }
}