#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  getline(cin, s);
  while (n--) {
    vector<int> a, b;
    getline(cin, s);
    int pos = 0;
    while (~s.find("Hoshina", pos)) {
      pos = s.find("Hoshina", pos) + 1;
      a.push_back(pos - 1);
    }
    while (~s.find("Hoshino", pos)) {
      pos = s.find("Hoshino", pos) + 1;
      b.push_back(pos - 1);
    }
    for (int i = 0; i < a.size(); i++) s.replace(a[i], 7, "Hoshino");
    for (int i = 0; i < b.size(); i++) s.replace(b[i], 7, "Hoshina");
    cout << s << endl;
  }
}
