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

int main(){
	int dataN,i,j,tmp;
	string str;
	
	cin>>dataN;
	for(j=0;j<dataN;j++){
	 cin>>str;
	 while(1){
	  tmp=str.find("Hoshino");
	  if(tmp==-1){break;}
	  str[tmp+6]='a';
	 }
	 cout<<str<<endl;
	}
	
	return 0;
}