#include <bits/stdc++.h>
int main() {
  int n;
  std::string str;
  std::string fr = "Hoshino";
  std::string to = "Hoshina";
  std::string::size_type pos;
  std::cin >> n;
  while (n > 0 && std::getline(std::cin, str)) {
    pos = str.find(fr);
    while (pos != std::string::npos) {
      str.replace(pos, fr.size(), to);
      pos = str.find(fr, pos + to.size());
    }
    std::cout << str << std::endl;
    str = "";
    std::cin.clear();
    --n;
  }
}
