#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  cin.ignore();
  while (n--) {
    string in;
    getline(cin, in);
    stringstream ss(in);
    string word;
    string out;
    while (ss >> word) {
      if (word == "Hoshino") {
        out += "Hoshina ";
      } else {
        out += word + ' ';
      }
    }
    out.erase(out.end() - 1);
    cout << out << endl;
  }
  return 0;
}
