#include <bits/stdc++.h>
using namespace std;main(){int N;string S,T="Hoshino";cin>>N;for(int i=0;i<N;i++){getline(cin,S);while(S.find(T)!=-1){S.replace(S.find(T),S.find(T)+7,"Hoshina");}cout<<S<<"\n";}}