#include <bits/stdc++.h>
int main(void) {
  int n;
  std::cin >> n;
  std::cin.ignore();
  for (size_t i = 0; i < n; ++i) {
    std::vector<std::string> str;
    std::string line;
    std::string buf;
    std::string tmp;
    std::getline(std::cin, buf);
    std::istringstream is(buf);
    while (is >> tmp) {
      if (tmp.find("Hoshino") != -1) {
        tmp.replace(tmp.find("Hoshino"), 7, "Hoshina");
      }
      str.push_back(tmp);
    }
    for (std::vector<std::string>::iterator it = str.begin(); it != str.end();
         ++it) {
      if (it == (str.end() - 1)) {
        line = line + *it;
      } else {
        line = line + *it + " ";
      }
    }
    std::cout << line << std::endl;
  }
  return 0;
}
