#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  string a;
  string g = "Hoshino";
  while (cin >> n) {
    cin.ignore();
    for (int i = 0; i < n; ++i) {
      int x = 0;
      getline(cin, a);
      if ((x = a.find("Hoshino")) >= 0) a.replace(x, g.length(), "Hoshina");
      cout << a << endl;
    }
  }
  return 0;
}
