#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string sub;
  for (int i = 0; i < n; ++i) {
    string s;
    getline(cin, s);
    for (int j = 0; j < s.size(); ++j) {
      if (s.size() < 7) {
        break;
      }
      sub = s.substr(j, 7);
      if (sub == "Hoshino") {
        s.replace(j, 7, "Hoshina");
      }
    }
    cout << s << endl;
  }
  return 0;
}
