#include <iostream>
#include <string>
using namespace std;
int search(string a,int *loc){
	*loc = a.find("Hoshino",0);
	return *loc;
}
int main(){
	string a,t="Hoshina";
	int n,loc;
	cin >> n;
	getline(cin,a);
	while(n--){
		loc=0;
		getline(cin,a);
		while(~search(a,&loc)) a.replace(loc,t.length(),t);
		cout << a << endl;
	}
	return 0;
}