
#include <iostream>
#include <string>

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