#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string str;
    vector<string> vs;
    vs.clear();
    while (cin >> str) {
      if (str == "Hoshino") {
        vs.push_back("Hoshina");
      } else
        vs.push_back(str);
    }
    for (int j = 0; j < vs.size(); j++) {
      cout << vs[j];
      if (j != vs.size() - 1) cout << " ";
    }
    cout << endl;
  }
  return 0;
}
