#include <iostream>
#include <string>

std::string& replace_all(std::string& str, const std::string& from, const std::string& to) {
    std::size_t start_pos = 0;
    while( (start_pos = str.find(from, start_pos)) != std::string::npos ) {
        str.replace(start_pos, from.length(), to);
        start_pos += to.length();
    }
    return str;
}

int main(void) {
    u_int n;
    std::string str;
    const std::string from  = "Hoshino";
    const std::string to    = "Hoshina";

    std::cin >> n;
    std::cin.ignore(); // ignore next newline character
    for (u_int i = 0; i < n; ++i) {
        std::getline(std::cin, str);
        std::cout << replace_all(str, from, to) << std::endl;
    }

    return 0;
}

/* requre clang or gcc 4.9 or later */
/*
#include <iostream>
#include <string>
#include <regex>

int main(void) {
    int n;
    std::string str;
    std::regex regexp("Hoshino");

    std::cin >> n;
    std::cin.ignore();
    for (int i = 0; i < n; ++i) {
        std::getline(std::cin, str);
        std::cout << std::regex_replace(str, regexp, "Hosina") << std::endl;
    }

    return 0;
}
*/