#include <iostream>
#include <string>
using namespace std;

int main() {
  int n;
  size_t o;
  string line;
  cin >> n;
  getline(cin, line);
  for (int i=0; i<n; i++) {
    getline(cin, line);
    o = 0;
    while (1) {
      o = line.find("Hoshino", o);
      if (o == string::npos) break;
      line.replace(o, 7, "Hoshina");
    }
    cout << line << endl;
  }
  return 0;
}