#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (--n) {
    string str;
    int cnt = 0;
    while (cin >> str) {
      if (cnt++) cout << ' ';
      if (str == "Hoshino") str = "Hoshina";
      cout << str;
    };
    cout << '\n';
  };
}
