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

namespace AOJ0101
{
    class Program
    {
        static void Main(string[] args)
        {
            int num_lines = int.Parse(Console.ReadLine());
            List<string> corrected_line_list = new List<string>();
            for (int i = 1; i <= num_lines; i++)
            {
                Line original_line = new Line(Console.ReadLine());
                corrected_line_list.Add(original_line.error_correction());
            }
            Console.WriteLine(string.Join("\n", corrected_line_list.ToArray()));
        }

    }

    public class Line
    {
        private string original_line;

        public Line(string original_line)
        {
            this.original_line = original_line;
        }

        public string error_correction()
        {
            List<string> original_line_list = original_line.Split(' ').ToList();
            List<string> corrected_line_list = new List<string>();
            foreach (string word in original_line_list)
            {
                if (word.Contains("Hoshino")) {
                    corrected_line_list.Add(word.Replace("Hoshino", "Hoshina"));
                } else
                {
                    corrected_line_list.Add(word);
                }
            }
            return string.Join(" ", corrected_line_list.ToArray());
        }

        public void line_change(string new_line)
        {
            original_line = new_line;
        }
    }

}