#include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<cmath>
#include<algorithm>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<set>
using namespace std;
int main(){
int counter;
string n;
cin>>counter;
cin.ignore();
for(int iii=0;iii<counter;iii++){
	getline(cin,n);
	string tmp="";
	for(int i=0;i<=n.size();i++){
		if(n[i]==' '||i==n.size()){
			if(tmp=="Hoshino")cout<<"Hoshina";
		else cout<<tmp;
		if(n[i]==' ')cout<<" ";
		else cout<<endl;
		tmp.clear();
		}
		else tmp.push_back(n[i]);
	}//endfor
}

	return 0;
}