#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, index;
  cin >> n;
  cin.ignore();
  vector<string> s(n);
  for (int i = 0; i < n; ++i) {
    getline(cin, s[i]);
    index = s[i].find("Hoshino", 0);
    if (index != string::npos) {
      s[i].replace(index, 7, "Hoshina");
    }
    cout << s[i] << endl;
  }
  return 0;
}
