#include <bits/stdc++.h>
using namespace std;
int main() {
  char in[1001];
  int n;
  char hoshina[] = {"Hoshina"};
  string words;
  string::size_type hed;
  cin >> n;
  fflush(stdin);
  for (int i = 0; i < n; i++) {
    gets(in);
    words = in;
    while (words.find("Hoshino") != string::npos) {
      hed = words.find("Hoshino");
      for (int j = 0; j < 7; j++) {
        words[hed] = hoshina[j];
        hed++;
      }
    }
    cout << words << endl;
  }
  return 0;
}
