#include <iostream>
#include <string>

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

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

    std::string dummy;
    getline(std::cin, dummy);

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

        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) {
            str[pos + 6] = 'a';

            // increase cursor
            cur += (pos + MISS_STR.size() - 1);
            pos = str.find(MISS_STR, cur);
        }

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

    return 0;
}