#include<iostream>
#include<sstream>
#include<fstream>
#include<cstdio>
#include<vector>
#include<list>
#include<queue>
#include<deque>
#include<stack>
#include<bitset>
#include<map>
#include<set>
#include<algorithm>
#include<string>
#include<cstring>
#include<cmath>
#include<cstdlib>
using namespace std;

int main(){
	int n;
	scanf("%d ",&n);
	for(int x=0;x<n;++x){
		string line;
		getline(cin,line);
		while (line.find("Hoshino") != string::npos) {
            		line.replace(line.find("Hoshino"), 7, "Hoshina");
       		}	
		cout<<line<<endl;	
	}
	return 0;
}