#include <iostream>

using namespace std;

void replaceAll(string &str,const string from,const string to){
  string::size_type pos = 0;
  while((pos=str.find(from))!= string::npos)
    {
      str.replace(pos,from.size(),to);
    }
}
int main(){
  int n;
  cin >> n;
  string line;
  getline(cin , line);
  while(n--){
    getline(cin, line);
    replaceAll(line, "Hoshino","Hoshina");
    cout << line << endl;
  }
  return 0;
}