#include <bits/stdc++.h>

using namespace std;

int main()
{
	int tc;
	char str[1011];
	
	cin >> tc;
	while(tc--) {
		scanf(" %[^\n]", str);
		string s(str);
		int len = s.size();
		for(int i = 0; i < len; i++) {
			int pos = s.find("Hoshino");
			int lastPos = s.find(pos+2, 'o');
			if(pos != -1 && lastPos != len - 1)
				s.replace(pos, 7, "Hoshina");
			else if(pos != -1)
				s.replace(pos, 6, "Hoshina");
		}
		cout << s <<endl;
	}

	return 0;
}