#include <bits/stdc++.h>
int n;
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) {
    string a;
    while (cin >> a && a != "\n") {
      if (a == "Hoshino") {
        a = "Hoshina";
      }
      cout << a << " ";
    }
    cout << "\n";
  }
  return 0;
}
