#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (n--) {
    string s, t, u;
    getline(cin, s);
    t = "Hoshino";
    u = "Hoshina";
    for (int i = 0; i < s.size(); ++i) {
      if (s.substr(i, t.size()) == t) {
        cout << u;
        i += t.size() - 1;
      }
    }
    cout << endl;
  }
  return 0;
}
