#include <bits/stdc++.h>
using namespace std;
int rep(string a, int *loc) {
  *loc = a.find("Hoshino");
  return *loc;
}
int main() {
  string a, t = "Hoshina";
  int n, loc;
  cin >> n;
  getline(cin, a);
  while (n--) {
    loc = 0;
    getline(cin, a);
    while (!rep(a, &loc)) a.replace(loc, t.length(), t);
    cout << a << endl;
  }
  return 0;
}
