#include <bits/stdc++.h>
using namespace std;
int main() {
  bool flg;
  int n, i, c;
  string w, s;
  unsigned int x;
  cin >> n;
  for (i = 0; i < n; i++) {
    c = 0;
    s = "";
    while (1) {
      w = "", flg = false;
      cin >> w;
      if (w == "Hoshino.")
        if ((x = w.find(".", 0)) != string::npos) s += "Hoshina.", flg = true;
      if (w == "Hoshino") s += "Hoshina", flg = true;
      if (!flg) s += w;
      if (cin.get() == '\n') break;
      s += " ";
    }
    s.erase(s.end(), s.end());
    cout << s << endl;
  }
  return 0;
}
