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