#include <iostream>
#include <vector>
#include <sstream>
#include <algorithm>
#include <string>
 
int main(){
    int dataSetNum;
    std::cin >> dataSetNum;

    //std::vector<string> *str = new std::vector<string>[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;
        std::string buf;
 
        std::cin >> tmp;
 
        std::stringstream ss(tmp);
        //sprit
        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::for_each(str[i].begin(), str[i].end(),
    [](std::string x) { std::cout << x << ' '; });

        std::cout << std::endl;
    }
 
    return 0;
}