using System;
class Example
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        for (int a = 0; a < n; a++)
        {
            string[] input = Console.ReadLine().Split(' ');
            if (string.IsNullOrEmpty(input[0]))
                break;
            for (int i = 0; i < input.Length - 1; i++)
            {
                if (input[i] == "Hoshino")
                    input[i] = "Hoshina";
                Console.Write(input[i] + " ");
            }
            Console.WriteLine(input[input.Length - 1]);

        }
    }
}