#include <bits/stdc++.h>
const double PI = acos(-1);
using namespace std;
int main() {
  int n;
  cin >> n;
  cin.ignore();
  for (int j = 0; j < n; j++) {
    string s;
    getline(cin, s);
    if (s.size() < 7) continue;
    size_t n;
    while (n = s.find("Hoshino"), n != string::npos) s[n + 6] = 'a';
    cout << s << endl;
  }
}
