#include <iostream>
#include <stdio.h>
#include <string>

using namespace std;

int main(){
	int n,start;
	string s;

	cin >> n;

	for(int i=0;i<n+1;i++){
		std::getline(cin,s);
		while(1){
			start = s.find("Hoshino",0);
			if(std::string::npos==start)break;
			s.replace(start,7,"Hoshina");
		}
		cout << s << endl;
	}

	return 0;
}