#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
    string str, judge = "";
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        if (i == 0) { getline(cin, str); }
        getline(cin, str);
        for (int j = 0; j < str.size(); j++) {
            judge += str[j];
            if(str[j] < 'A' || str[j] > 'z' || str[j]==' ' ){
                cout << judge;
                judge = "";
            }
            if (judge == "Hoshino" && str[j + 1] >= 'A' && str[j + 1] <= 'z') {
                cout << judge;
                judge = "";
            }
            if (judge == "Hoshino") {
                cout << "Hoshina";
                judge = "";
            }
            else if (j == str.size() - 1) {
                cout << judge;
                judge = "";
            }
        }
        cout << endl;
    }
    return 0;
}