using System;
public class hello
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        var sfrom = "Hoshino";
        var sto = "Hoshina";
        for (int i = 0; i < n; i++)
        {
            var s =Console.ReadLine().Trim();
            var ans = s.Replace(sfrom, sto);
            Console.WriteLine(ans);
        }
    }
}