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