#include <iostream>

using namespace std;

const string from = "Hoshino";
const string to = "Hoshina";

int main()
{
    int n;

    cin >> n;
    cin.ignore();
    
    while (n--) {
        string inp;

        getline(cin, inp);
        string::size_type pos = 0;
        while (pos = inp.find(from, pos), pos != string::npos) {
            inp.replace(pos, to.length(), to);
            pos += to.length();
        }
        cout << inp << endl;
    }

    return 0;
}