#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    string s;
    string a;
    cin.ignore();
    getline(cin, s);
    stringstream ss(s);
    string ret;
    bool b = false;
    while (!ss.eof()) {
      ss >> ret;
      if (b) cout << " ";
      b = true;
      if (ret == "Hoshino") {
        cout << "Hoshina";
      } else {
        cout << ret;
      }
    }
    cout << endl;
  }
}
