#include <bits/stdc++.h>
using namespace std;
string all_replace(const string& str, const string& target,
                   const string& parts) {
  string result = str;
  int p = 0;
  while ((p = result.find(target, p)) != string::npos) {
    result.replace(p, target.length(), parts);
    p += target.length() + 1;
  }
  return result;
}
int main() {
  int n, i;
  string in;
  cin >> n;
  cin.ignore();
  for (i = 0; i < n; i++) {
    getline(cin, in);
    cout << all_replace(in, "Hoshino", "Hoshina") << endl;
  }
  return 0;
}
