#include <bits/stdc++.h>
const double PI = acos(-1);
using namespace std;
int main() {
  int n = 3;
  cin >> n;
  for (int i = 0; i < n + 1; i++) {
    string s;
    getline(cin, s);
    if (s.size() < 7) continue;
    for (int i = 0; i < s.size() - 6; i++)
      if (s.substr(i, 7) == "Hoshino") s.replace(i, 7, "Hoshina");
    cout << s << endl;
  }
}
