#include <iostream>
#include <iterator>
#include <string>
using namespace std;
int main()
{
	bool flg;
	int n, i, c;
	string w, s;
	unsigned int x;
	while (cin >> n)
	{
		if (cin.eof()) break;
		for (i = 0; i < n; i++)
		{
			c = 0;
			s = "";
			while (1)
			{
				w = "", flg = false;
				cin >> w;
				if (w == "Hoshino.")
					s += "Hoshina.", flg = true;
				if (w == "Hoshino")
					s += "Hoshina", flg = true;
				if (!flg)
					s += w;
				if (cin.get() == '\n') break;
				s += " ";
			}
			s.erase(s.end(), s.end());
			cout << s << endl;
		}
	}
	return 0;
}