#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <sstream>

using namespace std;

#define loop(i,a,b) for(int i=(a);i<int(b);i++)
#define rep(i,b) loop(i,0,b)

int main(){
    int n;
    cin >> n;
    cin.ignore();
    rep(_, n){
        string s;
        getline(cin, s);
        stringstream ss(s);
        string t;
        vector<string> input;
        while (ss >> t){
            input.push_back(t);
        }
        rep(i, input.size()){
            if (input[i] == "Hoshino"){
                cout << "Hoshina";
            }
            else{
                cout << input[i];
            }
            if (i == input.size() - 1)cout << endl;
            else cout << " ";
        }
    }
}