#include <string>
#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
	char in[1002];
	int n;
	char hoshina[] = {"Hoshina"};
	string words;
	string::size_type hed;

	cin >> n;
	fflush(stdin);

	for(int i = 0; i < n; i++){
		fgets(in,1000,stdin);
		words = in;
		while(words.find("Hoshino ") != string::npos){
			hed = words.find("Hoshino ");
			for(int j = 0; j < 7; j++){
				words[hed] = hoshina[j];
				hed++;
			}
		}
		if(words.find("Hoshino\0") != string::npos){
			hed = words.find("Hoshino\0");
			for(int j = 0; j < 7; j++){
				words[hed] = hoshina[j];
				hed++;
			}
		}
		cout << words;
	}

	return 0;
}