#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
template <class T>
void preview(T a, T b) {
  for (T it = a; it != b; ++it) cerr << *it << " ";
  cerr << endl;
}
const int INF = 100000000;
const double PI = acos(-1.0), EPS = 1e-10;
int main() {
  int N;
  cin >> N;
  cin.ignore();
  for (int i = 0; i < (int)N; ++i) {
    string line;
    getline(cin, line);
    istringstream is(line);
    bool fst = true;
    for (string w; is >> w;) {
      if (!fst) cout << " ";
      if (w == "Hoshino")
        cout << "Hoshina";
      else
        cout << w;
      fst = false;
    }
    cout << endl;
  }
  return 0;
}
