#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  cin.ignore();
  for (int _ = (0); _ < int(n); _++) {
    string s;
    getline(cin, s);
    stringstream ss(s);
    string t;
    vector<string> input;
    while (ss >> t) {
      input.push_back(t);
    }
    for (int i = (0); i < int(input.size()); i++) {
      if (input[i] == "Hoshino") {
        cout << "Hoshina";
      } else {
        cout << input[i];
      }
      if (i == input.size() - 1)
        cout << endl;
      else
        cout << " ";
    }
  }
}
