// 2011/01/12 Tazoe

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

int main()
{
	int n;
	cin >> n;

	string eng;
	getline(cin, eng);

	for(int i=0; i<n; i++){
		getline(cin, eng);
		while(true){
			string::size_type index = eng.find("Hoshino");
			if(index == string::npos)
				break;
			else
				eng.replace(index, 7, "Hoshina");
		}

		cout << eng << endl;
	}

	return 0;
}