#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char c;
  scanf("%c", &c);
  for (int p = 0; p < n; p++) {
    string s;
    getline(cin, s);
    for (int i = 0; i < s.length() - 6; i++) {
      int b = (int)s.find("Hoshino", i);
      if (b != -1) {
        s.replace(b + i, 7, "Hoshina");
        i += 7;
      }
    }
    cout << s << endl;
  }
}
