#include <iostream>
#include <string>
#include <sstream>

int main(){
    std::string buf;
    int n;
    
    std::cin >> n;
    // now, there is "\n ...." in the stream.
    // then, skip the initial '\n'.
    std::getline(std::cin,buf);

    for (int i=0;i < n;++i) {
        std::getline(std::cin,buf);
        std::stringstream ss(buf);
        while (ss >> buf) {
            if (buf == "Hoshino") {
                std::cout << "Hoshina ";
            }
            else if (buf == "Hoshino,") {
                std::cout << "Hoshina, ";
            }
            else if (buf == "Hoshino.") {
                std::cout << "Hoshina. ";
            }
            else{
                std::cout << buf << " ";
            }
        }
        std::cout << std::endl;
    }
    
    return 0;
}