#include <iostream>
#include <string>

static const std::string MISS_STR = "Hoshino";
static const std::string CORRECT_STR = "Hoshina";

int main(void) {
    int n;
    std::cin >> n;

    std::string dummy;
    std::cin.get();

    for (int i = 0; i < n; i++) {
        std::string str;
        std::getline(std::cin, str);

        std::string::size_type pos;
        while (pos = str.find(MISS_STR), pos != std::string::npos) {
            str.replace(pos, CORRECT_STR.size(), CORRECT_STR);
        }

        std::cout << str << std::endl;
    }

    return 0;
}