#include <bits/stdc++.h>
using namespace std;
static inline int in() {
  int x;
  scanf("%d", &x);
  return (x);
}
static inline long long int inl() {
  long long int x;
  scanf("%lld", &x);
  return (x);
}
vector<string> split(const string& input) {
  istringstream stream(input);
  string field;
  vector<string> result;
  while (std::getline(stream, field, ' ')) {
    result.push_back(field);
  }
  return result;
}
int main() {
  int n;
  scanf("%d\n", &n);
  for (int i = (0), i_ = (n); i < i_; ++i) {
    string line;
    std::getline(cin, line);
    vector<string> words = split(line);
    for (vector<string>::iterator it = words.begin(); it != words.end(); it++) {
      string showStr = *it;
      int findPos = showStr.find("Hoshino");
      if (findPos != string::npos && findPos == 0 &&
          !isalpha(showStr.substr(7).data()[0])) {
        showStr.replace(findPos, 7, "Hoshina");
      }
      printf("%s ", showStr.c_str());
    }
    cout << endl;
  }
  return (0);
}
