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

int main(){
	string x;
	int pos;
	int n;
	cin >> n;
		x = "";
		cin.ignore();
		while (n--){
			cin >> x;
		while ((pos=x.find("Hoshino"))!= string::npos){
			x.replace(pos, 7, "Hoshina");
		}
		cout << x << endl;

	}
	return 0;
}