#include<iostream>
#include<string>

using namespace std;

int main(){
	string text;
	int n,j;
	int i;
	
	cin>>n;
	for(j=0;j<n;j++){
	 cin>>text;
	 while(1){
	  i=text.find("Hoshino");
	  if(i!=string::not_found){
	   text[i+6]='a';
	  }else{
	   break;
	  }
	 }
	 cout<<text<<endl;
	}
}