#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  cin.ignore(1, '\n');
  for (int i = 0; i < n; ++i) {
    string s;
    getline(cin, s);
    int index = 0;
    while (1) {
      index = s.find("Hoshino", index);
      if (index == string::npos) break;
      s.replace(index, strlen("Hoshino"), "Hoshina");
      index += strlen("Hoshina");
    }
    cout << s << endl;
  }
  return 0;
}
