#include <bits/stdc++.h>
using namespace std;
static const double PI = 6 * asin(0.5);
static const int INF = 1 << 24;
template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()) {
  v.assign(a, vector<T>(b, t));
}
int main() {
  int n;
  cin >> n;
  string t;
  getline(cin, t);
  for (int(i) = (0); (i) < ((n)); ++(i)) {
    string s;
    getline(cin, s);
    if (s.size() <= 7) {
      cout << s << endl;
      continue;
    }
    for (int(j) = (0); (j) < ((s.size() - 6)); ++(j)) {
      if (s.substr(j, 7) == "Hoshino") {
        s[j + 6] = 'a';
      }
    }
    cout << s << endl;
  }
  return 0;
}
