#include <iostream>
#include <string>

int main(){
  int n;
  int i = 0;
  std::string str;
  std::string fr = "Hoshino";
  std::string to = "Hoshina";
  std::string::size_type ch;

  std::cin >> n;

  while(n > 0){
    
    //文字列の読み込み
    while(std::cin >> str){
    //"Hishino"を"Hoshina"に変換
        ch = str.find(fr);
        while(str.find(fr) != std::string::npos){
            str.replace(str.find("Hoshino"),fr.size(), to);
            ch = str.find(fr,ch+to.size());
            
    }
        std::cout << str << " " << std::flush;
        }
      --n;
      
}
}
