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

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