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