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