#include <iostream>
using namespace std;
int main(){
  string str;
  int n;
  cin >> n;
  cin.ignore();
  while(n--){
  getline(cin,str);

    for(int pos = str.find("Hoshino") ; pos != string::npos ;
	pos = str.find("Hoshino",7 + pos ))
      {
	str.replace(pos,7,"Hoshina");
      }
    cout << str << endl;
  }
  return 0;
}