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