#include <bits/stdc++.h>
int main() {
  int num;
  std::string english;
  std::cin >> num;
  std::getline(std::cin, english);
  for (int i = 0; i < num; ++i) {
    std::getline(std::cin, english);
    while (english.find("Hoshino") != -1) {
      size_t find = english.find("Hoshino");
      english.replace(find, find + 7, "Hoshina");
    }
    std::cout << english << std::endl;
  }
  return 0;
}
