#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i = 0, index;
  string s;
  cin >> n;
  while (i <= n) {
    getline(cin, s);
    while (true) {
      string::size_type index = s.find("Hoshino");
      if (index != string ::npos) {
        s.replace(index, 7, "Hoshina");
      } else {
        break;
      }
    }
    cout << s << endl;
    i++;
  }
  return 0;
}
