#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;

string convert(string org){
	string name = "Hoshino";
	int i = 0;
	int j = 0;
	while(org[i]!=0){
		while(org[i]!=0 && name[j]!=0 && org[i]==name[j]){
			++i;++j;
		}
		if(j==name.size()){
			org[i-1] = 'a';
			--i;
		}
		++i;
		j = 0;
	}
	return org;
}

int main(){
	int n;
	string line;
	getline(cin,line);
	sscanf(line.c_str(),"%d",&n);
	for(int x=0;x<n;++x){
		getline(cin,line);
		line = convert(line);
		cout<<line<<endl;
	}
	return 0;
}