#include <iostream>
#include <string>
#include <stdlib.h>

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

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

    const int nn = n;

    while (0 <= n--) {
        std::string str;
        std::getline(std::cin, str);

        // :(
        if (nn - 1 == n) {
            continue;
        }

        const unsigned int str_size = str.size();
        unsigned int cur = 0;
        std::string::size_type pos = str.find(MISS_STR, 0);

        while (pos != std::string::npos && cur <= str_size) {
            // fix miss
            for (unsigned int i = cur; i < pos; i++) {
                std::cout << str.at(i);
            }
            std::cout << CORRECT_STR;

            // increase cursor
            cur += (pos + MISS_STR.size());

            pos = str.find(MISS_STR, cur);
        }

        for (unsigned int i = cur; i < str_size; i++) {
            std::cout << str.at(i);
        }
        std::cout << std::endl;
    }

    return 0;
}