#include<iostream>
#include<string>
using namespace std;

int main(){
    int n;
    string s;
    cin >> n;
    getline(cin, s);
    for(int i=0; i < n; i++){
        getline(cin, s);
        while(true){
            string::size_type index = s.find("Hoshino");
            if(index == string::npos) break;
            else s.replace(index, 7, "Hoshina");
        }
        cout << s << endl;
    }
}