#include <bits/stdc++.h>
int main() {
  int n;
  int i = 0;
  std::string str;
  std::cin >> n;
  while (n > 0) {
    while (std::cin >> str) {
      ++i;
      if (str.find("Hoshino") != std::string::npos) str = "Hoshina";
      std::cout << str << std::endl;
    }
    --n;
  }
}
