using System;

class Program
{
    static void Main(string[] args)
    {
        int a11 = int.Parse(Console.ReadLine());
        //  int a1 = 0;
        for (int i = 0; i < a11; i++)
        {
            string[] a = Console.ReadLine().Split();
            for (int k = 0; k < a.Length; k++)
            {
                if (a[k] == "Hoshino")
                {
                    Console.Write("Hoshina");
                    if (k == a.Length - 1) { break; }
                }
                else if (a[k] == "Hoshino.") { Console.Write("Hoshina."); break; }
                else { Console.Write(a[k]); if (k == a.Length - 1) { break; } }
                if (k < a.Length - 1) { Console.Write(" "); }
           
            }Console.WriteLine();
        }
        Console.ReadLine();
    }
}