#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  for (int i = 0; i < n; ++i) {
    std::string text;
    std::getline(std::cin, text);
    int text_size = text.size();
    int moji = 0;
    while (moji < text_size) {
      moji = text.find("Hoshino", moji);
      text.replace(moji, 7, "Hoshina");
    }
    std::cout << text << std::endl;
  }
  return 0;
}
