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

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

	}
		return 0;
}