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

int main(){
    int dataSetNum;
    std::cin >> dataSetNum;

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

    //input & sprit
    for(int i = 0; i < dataSetNum; ++i){
        //input
        std::string tmp;
        getline(std::cin, tmp);
        std::stringstream ss(tmp);

        //sprit
        std::string buf;
        while( getline(ss, buf, ' ') ){
            str[i].push_back(buf);
        }
    }

    //replace
    for(int i = 0; i < dataSetNum; ++i){
        std::replace_if(str[i].begin(), str[i].end(),
    [](std::string x) { return x == "Hoshino"; }, "Hoshina");
    }
    
    //output
    for(int i = 0; i < dataSetNum; ++i){
    	std::string tmp;
    	tmp = str[i].front();
    	std::for_each(str[i].begin() + 1, str[i].end(),
    [&tmp](std::string x) { tmp += ' ' + x; } );
    	std::cout << tmp << std::endl;
    }

    return 0;
}