#include <iostream>
#include <string>
using namespace std;
#define rep(j,n) for(int j = 0 ; j < 7 ; j++)

int main(){
    string str;
    int n;
    
    cin >> n;
    for(int k = 0 ; k <= n ; k++){
        getline(cin,str);
        for(int i = 0 ; i < str.length() ; i++){
            string key = str.substr(i,7),repl;
            if(key == "Hoshino"){
                repl = "Hoshina";
                rep(j,n) str[i+j] = repl[j];
            }
        }
        cout << str << endl;
    }

    return 0;
}