#include <bits/stdc++.h>
using namespace std;
int main() {
  int counter;
  string n;
  cin >> counter;
  cin.ignore();
  for (int iii = 0; iii < counter; iii++) {
    getline(cin, n);
    string tmp = "";
    for (int i = 0; i <= n.size(); i++) {
      if (n[i] == ' ' || i == n.size()) {
        if (tmp == "Hoshino")
          cout << "Hoshina";
        else
          cout << tmp;
        if (n[i] == ' ')
          cout << " ";
        else
          cout << endl;
        tmp.clear();
      } else
        tmp.push_back(n[i]);
    }
  }
  return 0;
}
