include <iostream>
#include <string>

using namespace std;

int main(void){
  int line_length;
  cin>>line_length;cin.ignore(2);

  string input;

  for(int i=0;i<line_length;++i){
    getline(cin,input);
    std::string::size_type pos;
    while(( pos = input.find("Hoshino")) != std::string::npos){
      input.replace(pos, 7, "Hoshina");
    }
    cout << input<<endl;
  }
