#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  int n;
  cin >> n;
  for (int k = 0; k <= n; k++) {
    getline(cin, str);
    for (int i = 0; i < str.length(); i++) {
      string key = str.substr(i, 7), repl;
      if (key == "Hoshino") {
        repl = "Hoshina";
        for (int j = 0; j < 7; j++) str[i + j] = repl[j];
      }
    }
    cout << str << endl;
  }
  return 0;
}
