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