#include <iostream>
#include <string>
#include <regex>

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

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

    return 0;
}