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