#include <bits/stdc++.h>
using namespace std;
const int MAX = 101;
template <class T, class U>
void convert(T &t, U &u) {
  stringstream ss;
  ss << t;
  ss >> u;
}
int main() {
  int n;
  cin >> n;
  cin.ignore();
  while (n--) {
    string s;
    getline(cin, s);
    for (int i = 0; i < s.size(); i++) {
      int res = s.find("Hoshino", i);
      if (res == -1) break;
      s.replace(res, 7, "Hoshina");
      i += 7;
    }
    cout << s << endl;
  }
  return 0;
}
