#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

string &replaceAll(string &s, const string &from, const string &to) {
  int pos = 0;
  size_t find_pos;
  while ((find_pos = s.find(from, pos)) != string::npos) {
    s.replace(find_pos, from.size(), to);
    pos = find_pos + to.size();
  }
  return s;
}

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int n;
  cin >> n;
  cin.ignore();
  for (int i = 0; i < n; i++) {
    string s;
    getline(cin, s);
    cout << replaceAll(s, "Hoshino", "Hoshina") << endl;
  }

  return 0;
}
