#include <bits/stdc++.h>
using namespace std;
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
int main() {
  ios::sync_with_stdio(false);
  string str1, str2, str3;
  str2 = "Hosino";
  str3 = "Hosina";
  int n;
  cin >> n;
  cin.ignore();
  while (n--) {
    getline(cin, str1);
    string::size_type pos = str1.find(str2);
    while (pos != string::npos) {
      str1.replace(pos, str2.size(), str3);
      pos = str1.find(str2, pos + str3.size());
    }
    cout << str1 << endl;
  }
}
