#include <bits/stdc++.h>
int main() {
  int dataSetNum;
  std::cin >> dataSetNum;
  std::vector<std::string> str;
  str.resize(dataSetNum);
  std::cin.ignore();
  for (int i = 0; i < dataSetNum; ++i) {
    std::string tmp;
    getline(std::cin, tmp);
    str[i] = tmp;
  }
  for (int i = 0; i < dataSetNum; ++i) {
    const std::string tmp("Hoshino");
    auto pos = str[i].find(tmp);
    while (pos != std::string::npos) {
      str[i].replace(pos, 7, "Hoshima");
      pos = str[i].find(tmp, pos + 7);
    }
  }
  std::for_each(str.begin(), str.end(),
                [](std::string x) { std::cout << x << std::endl; });
  return 0;
}
