#include<string>
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
int N,f=0;
string st;
string S="Hoshino";
string SA="Hoshina";
cin>>N;
for(int iii=0;iii<N;iii++){
while(cin>>st){
if(f>0)cout<<" ";
if(st==S)st=SA;
cout<<st;f++;
}f=0;
cout<<endl;
}
return 0;
}