#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    char _;
    cin >>  _;
    for (int i = 0; i < n; ++i) {
        string s;
        getline(cin, s);
        stringstream ss;
        ss << s;
        string t;
        while (getline(ss, t, ' ')) {
            if(t== "Hoshino") {
                cout << "Hoshina";
            } else {
                cout << t;
            }
            cout << ' ';
        }
        cout << endl;
    }
}