#include <iostream>
#include <cstring>
#include <string>
 
using namespace std;
 
int main(){
    string s;
    int n;
    int c_pos;
    cin>>n;
    cin.ignore();
    while(n--){
        getline(cin,s);
        while((c_pos=s.find("Hoshino"))!=string::npos){
            s.replace(c_pos,7,"Hoshina");
        }
        cout<<s<<endl;
    }
}
#include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

string s;

int main(){
	getline(cin,s);
	while(getline(cin,s)){
		int a=s.find("Hoshino");
		while(a!=string::npos){
			s=s.substr(0,a)+"Hoshina"+s.substr(a+7);
			a=s.find("Hoshino");
		}
		cout<<s<<endl;
	}
}