#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const double EPS = 1e-9;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1};
int n;
string str;
int main() {
  cin >> n;
  string h = "Hoshina";
  for (int i = 0; i < n; i++) {
    getline(cin, str);
    while (str.find("Hoshino") != string::npos) {
      str.replace(str.find("Hoshino"), h.length(), h);
    }
    cout << str << endl;
  }
  return 0;
}
