#include <iostream>
#include <string>

using namespace std;

int main(void){
	int n;
	cin >> n;
	cin.ignore();
	for(int i=0;i<n;i++){
		string S;
		getline(cin,S);
		string::iterator it=S.begin();
		while(S.find("Hoshino") != -1 ){
			S.replace(S.find("Hoshino"),7,"Hoshina");
		}
		cout << S << endl;
	}
	return 0;
}