#include<iostream>
#include<string>
using namespace std;
int main(){
long n,i;
string s;
string::size_type p;
cin>>n;
getline(cin,s);
for(i=0;i<n;i++){
getline(cin,s);
p=-1;
for(;;){
p=s.find("Hoshino",p+1);
if(p==string::npos)break;
s.replace(p,7,"Hoshina");
}
cout<<s<<endl;
}
return 0;
}