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

int main(void)
{
	int n;
	string str;
	cin >> n;
	getline(cin, str);
	while (n--)
	{
		getline(cin, str);
		while (str.find("Hoshino") != -1)
		{
			int x = str.find("Hoshino");
			str.replace(x,7,"Hoshina");
		}
		cout << str << endl;
	}
	return 0;
}
