#include <bits/stdc++.h>
using namespace std;
string Tol(string in) {
  for (int i = 0; i < in.length(); i++) {
    if (in[i] >= 'A' && in[i] <= 'Z') in[i] += ('a' - 'A');
  }
  return in;
}
string check(string s) {
  if (s == "Hoshino") return "Hoshina";
  return s;
}
int main() {
  int rev;
  cin >> rev;
  string t;
  getline(cin, t);
  for (int j = 0; j < rev; j++) {
    string in;
    getline(cin, in);
    in += '\n';
    vector<string> V;
    string str = "";
    for (int i = 0; i < in.length(); i++) {
      if (in[i] >= 'a' && in[i] <= 'z' || in[i] >= 'A' && in[i] <= 'Z')
        str += in[i];
      else {
        V.push_back(str);
        str = "";
        str += in[i];
        V.push_back(str);
        str = "";
      }
    }
    if (in != "") {
      V.push_back(str);
      str = "";
    }
    for (int i = 0; i < V.size(); i++) cout << check(V[i]);
  }
  return 0;
}
