#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  getline(cin, str);
  int n = str[0] - '0';
  for (int i = 0; i < n; i++) {
    string input;
    getline(cin, input);
    while (input.find("Hoshino") != string::npos) {
      input.replace(input.find("Hoshino"), 7, "Hoshina");
    }
    cout << input << endl;
  }
}
