#include<iostream>
#include<string>
using namespace std;
int main(){
  string cc,c;
  string base[2]={"Hoshino","Hoshina"};
  int n,x;
  cin >> n;
  getline(cin,c);
  for(int i=0;i<n;i++){
    getline(cin,cc);
    x = 0;
    while(1){
      if(x==0) x = cc.find(base[0],x);
      else if(x>0) x = cc.find(base[0],x+7);
      if(x==-1) break;
      cc.replace(x,7,base[1]);
    }
    cout << cc << endl;
  }
    return 0;
}