#include <bits/stdc++.h>
using namespace std;
int main() {
  string hosino = "Hosino";
  string hosina = "Hosina";
  int tSup;
  cin >> tSup;
  cin.ignore();
  for (int t = (0); t < (tSup); ++t) {
    string x;
    getline(cin, x);
    while (true) {
      int i = x.find(hosino, 0);
      if (i == string::npos) {
        break;
      }
      x.replace(i, hosino.length(), hosina);
    }
    cout << x << endl;
  }
  return 0;
}
