#include<iostream>
#include<string>
using namespace std;
int main(){
  int n;
  string str1;
  cin>>n;
  cin.ignore();
  for(int i=0;i<n;i++){
    getline(cin,str1);
    while(str1.find("Hoshino")!=string::npos){
      str1.replace(str1.find("Hoshino"),7,"Hoshina");
    }
    cout<<str1<<endl;
  }
  return 0;
}