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