#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  while (--n) {
    std::string s;
    std::getline(std::cin, s);
    while (s.find("Hoshino", 0) != std::string::npos) {
      s[s.find("Hoshino") + 6] = 'a';
    }
    std::cout << s << std::endl;
  }
  return 0;
}
