#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;

int main() {
	string st;
	int n;
	string::size_type id;
	cin >> n;
	getchar();
	for (n;n>0;n--) {
		getline(cin,st);
		id=0;
		while(true) {
			id=st.find("Hoshino",id);
			if (id==string::npos) break;
			st.replace(id,7,"Hoshina");
			id++;
		}
    cout << st << endl;  
	}
	return 0;
	}