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