#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

int main() {
  int n;
  string str;
  getline(cin, str);
  n = atoi(str.c_str());

  for (int i = 0; i < n; ++i) {
    string str;
    getline(cin, str);

    int pos = -1;
    while (pos = str.find("Hoshino", pos + 1), pos != string::npos)
      str.replace(pos, 7, "Hoshina");
    cout << str << endl;
  }
}
