using System;

    class Program
    {
        static void Main(string[] args)
        {
            int a11 = int.Parse(Console.ReadLine());
            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 "); }
                    else if (a[k] == "Hoshino.") { Console.Write("Hoshina."); }
                    else if (k == a.Length - 7) { Console.WriteLine(a[k]); }
                    else  Console.Write(a[k]+" ");

                }
            }
        
    }
}