#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
cin>>n;
cin.ignore();

for (int i = 0; i < n; ++i) {
	string s;
	string a;
	getline(cin,s);
	stringstream ss(s);
	string ret;
	bool b=false;
	while(!ss.eof()){
		ss>>ret;
		if(b)cout<<" ";
		b=true;
		if(ret=="Hoshino"){cout<<"Hoshina";}
		else{cout<<ret;}
	}cout<<endl;
}
}