#include <bits/stdc++.h>
using namespace std;
int main() {
  long double n;
  string spot;
  cin >> n;
  cin.ignore();
  for (int i = 0; i < n; i++) {
    getline(cin, spot);
    for (int j = 0; j < spot.size() - 6; j++) {
      string str = "";
      for (int k = j; k < j + 7; k++) {
        str += spot[k];
      }
      if (str == "Hoshino") {
        spot[j + 6] = 'a';
      }
    }
    cout << spot << endl;
  }
  return 0;
}
