#include <bits/stdc++.h>
using namespace std;
int main() {
  string words;
  int n;
  int index;
  cin >> n;
  for (int i = 0; i < n; i++) {
    getline(cin, words);
    int j;
    j = 0;
    while (1) {
      index = words.find("Hoshino", j);
      if (index == string::npos) {
        break;
      }
      words.replace(index, 7, "Hoshina");
      j += 6;
    }
    cout << words << endl;
  }
  return 0;
}
