#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    bool fir = true;
    while (cin >> s) {
      char c;
      c = getchar();
      if (!fir) cout << " ";
      if (s == "Hoshino")
        cout << "Hoshina";
      else
        cout << s;
      if (c == '\n') break;
      fir = false;
    }
    cout << endl;
  }
}
