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++)
            {
                a1 = 0;
                if (a[k] == "Hoshino") { Console.Write("Hoshina"); }
                else if (a[k] == "Hoshino.") { Console.WriteLine("Hoshina.");a1 = 1; }
                else if (k == a.Length - 1) { Console.WriteLine(a[k]); a1 = 1; }
                else Console.Write(a[k] + "");
                if (k<a.Length-1)
                {
                    Console.Write(" ");
                }
            }
        }
        Console.ReadLine();

    }
}