#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const double PI = 3.14159265359;
int main() {
  int n;
  string hos = "Hoshino";
  cin >> n;
  cin.ignore();
  while (n--) {
    string s;
    getline(cin, s);
    for (int i = 0; i < s.size() + 1 - hos.size(); i++) {
      if (s.substr(i, hos.size()) == hos) {
        s[i + hos.size() - 1] = 'a';
      }
    }
    cout << s << endl;
  }
  return 0;
}
