#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char _;
  cin >> _;
  for (int i = 0; i < n; ++i) {
    string s;
    getline(cin, s);
    regex re(R"(Hoshino)");
    auto r = regex_replace(s, re, "Hoshina");
    cout << r << endl;
  }
}
