#include <bits/stdc++.h>
int main() {
  std::string f = "Hoshino";
  std::string fa = "Hoshina";
  std::string a;
  int n;
  std::cin >> n;
  std::cin.ignore();
  for (int j = 0; j < n; j++) {
    getline(std::cin, a);
    std::string::size_type index = a.find(f);
    if (index == std::string::npos)
      std::cout << a << std::endl;
    else {
      for (int i = 0; i < f.size(); i++) {
        a[i + index] = fa[i];
      }
      std::cout << a << std::endl;
    }
  }
  return 0;
}
