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

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;
        vector<string> v;
        while (getline(ss, t, ' ')) {
            if (t == "Hoshino") {
                v.push_back("Hoshina");
            }
            else {
                v.push_back(t);
            }
        }
        for (size_t j = 0; j < v.size(); ++j) {
            cout << v[j];
            if (j == v.size() - 1) {
                cout << '\n';
            }
            else {
                cout << ' ';
            }
        }
    }
}