#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <set>
#include <bitset>

#define rep(i,j,k) for(int i=j;i<k;i++)
#define Sort(x) sort((x).begin(),(x).end())
#define fi first
#define se second
#define vi vector<int>
#define INF 1000000000
#define MOD 1000000009
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef std::pair<int,int> pii;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;


int main(){
    string s;
    int n;cin>>n;
    getline(cin,s);
    rep(i,0,n){
        getline(cin,s);
        if(s=="Hoshino"){
            cout<<"Hoshina"<<endl;
            continue;
        }
        string ss;
        bool start=true;
        rep(i,0,s.length()){
            if(s[i]==' '){
                if(!start)cout<<" ";
                if(start)start=false;
                if(ss=="Hoshino"){
                    cout<<"Hoshina";
                }else{
                    cout<<ss;
                }
                ss.clear();
            }else {
                ss.pb(s[i]);
            }
        }
        if(!start)cout<<" ";
        cout<<ss;
        cout<<endl;
    }

    
    return 0;
}


