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

typedef unsigned int uint;

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