#include <iostream>
#include <string>
using namespace std;
int main(){
	int n;
	string b;
	cin>>n;
	for(int j=0;j<n;j++){
		cin>>b;
		for(int i=0;i<b.size()-6;i++){
			if(b[i]=='H'&&b[i+1]=='o'&&b[i+2]=='s'&&b[i+3]=='h'&&b[i+4]=='i'&&b[i+5]=='n'&&b[i+6]=='o'){
				b[i+6]='a';
			}
		}
		for(int i=0;i<b.size();i++)
			cout<<b[i];
		cout<<endl;
	}
	return 0;
}