#include <iostream>
#include <vector>
#include <string>
#include <cstdio>

static void inputSentences(std::vector<std::string>& sentences, int n)
{
  fflush(stdin);
  for (int i = 0; i < n; i++) {
    std::string inputSentence;
    getline(std::cin, inputSentence);
    sentences.push_back(inputSentence);
  }
}

static void convertSentences(std::vector<std::string>& sentences)
{
  const std::string targetBase = "Hoshino";
  for (std::vector<std::string>::iterator it = sentences.begin();
    it != sentences.end();
    ++it) {
    /* ?????¬ */
    if (*it == targetBase) {
      it->at(6) = 'a';
      continue;
    }
    if (it->size() <= 7) {
      continue;
    }
    while(true) {
      int find;
      std::string targetStr;
      bool findFlg = false;
      /* ?????? */
      targetStr = " " + targetBase + " ";
      find = it->find(targetStr);
      if (find != std::string::npos) {
        it->at(find + 7) = 'a';
        findFlg = true;
      }
      /* ?????? */
      targetStr = targetBase + " ";
      find = it->find(targetStr);
      if (find == 0) {
        it->at(6) = 'a';
        findFlg = true;
      }
      /* ????°? */
      targetStr = " " + targetBase;
      find = it->find(targetStr);
      if (find == it->size() - 8) {
        it->at(it->size() - 1) = 'a';
        findFlg = true;
      }
      if (findFlg == false) {
        break;
      }
    }
  }
}

static void outputSentences(std::vector<std::string>& sentences)
{
  for (std::vector<std::string>::iterator it = sentences.begin();
    it != sentences.end();
    ++it) {
    std::cout << *it << std::endl;
  }
}

int main(void)
{
  int n;
  std::vector<std::string> sentences;

  std::cin >> n;

  inputSentences(sentences, n);
  convertSentences(sentences);
  outputSentences(sentences);

  return 0;
}