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

typedef unsigned int uint;

int main() {
	int n; string s; uint idx;
	cin >> n; cin.ignore();
	while(n--) {
		getline(cin, s);
		idx = -1;
		while((idx=s.find("Hoshino"))!=string::npos) s.replace(idx, 7, "Hoshina");
		cout << s << endl;
	}
	return 0;
}