#include<iostream>
#include<string.h>
using namespace std;
int main(){
  int n,m;
  string f,s;
  cin >> n;
  getline(cin, f);
  while(n--){
    getline(cin, s);
    while(1){
      m = s.find("Hoshino");
      if(m==-1) break;
      s = s.substr(0,m)+"Hoshina"+s.substr(m+7);
    }
    cout << s << endl;
  }
  return 0;
}

