#include <iostream>
#include <string>

using namespace std;

int main() {
	int b;
	cin >> b;
	string a;
	getline(cin, a);
	for (int i = 0; i < b; i++) {
		getline(cin, a);
		string::size_type index = a.find("Hoshino");
		while (index != string::npos) {
			a.replace(index, 7, "Hoshina");
			index += 7;
			index = a.find("Hoshino", index);
		}
		cout << a << endl;
	}
	return 0;
}