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

int main()
{
	int n;

	cin >> n;
	cin.clear();
	cin.ignore( 1, '\n' );

	for( int i = 0; i < n; ++i ){
		string s;
		getline( cin, s );
		int index = 0;
		while( ( index = s.find( "Hoshino", index ) ) != string::npos ){
			s.replace( index, strlen("Hoshino"), "Hoshina" );
			index += strlen("Hoshina");
		}
		cout << s << endl;
	}

	return 0;
}