#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string str;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> str;
    if (str == "Hoshino") str = "Hoshina";
    cout << str << endl;
  }
}
