#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

int main(){
	std::string correctword = "Hoshina";

    int dataSetNum;
    std::cin >> dataSetNum;

    std::vector< std::string > str;
    str.resize(dataSetNum);
    std::cin.ignore();

    //input 
    for(int i = 0; i < dataSetNum; ++i){
        //input
        std::string tmp;
        getline(std::cin, tmp);
        str[i] = tmp;
    }

    //replace
    for(int i = 0; i < dataSetNum; ++i){
    	std::string tmp = "Hoshino";
        //std::string::size_type pos = str[i].find(tmp);
        auto pos = str[i].find(tmp);
        while(pos != std::string::npos){
        	str[i].replace(str[i].begin() + pos, str[i].begin() + pos + 7, correctword.begin(), correctword.end() );
        	pos = str[i].find(tmp, pos + 7);
        }

    }
    
    //output
    for(int i = 0; i < dataSetNum; ++i){
    	std::for_each(str[i].begin() , str[i].end(),
    [](std::string x) { std::cout << x << std::endl; } );
    }

    return 0;
}