#include <iostream>
#include <string>
using namespace std;
int main() {
    int N;
    cin >> N;
    
    string line;
    getline(cin, line);
    
    int index;

    for (int n = 0; n != N; ++n) {
        getline(cin, line);
        while (line.find("Hoshino") != string::npos) {
            index = line.find("Hoshino");
            line.replace(index, 7, "Hoshina");
        }
        cout << line << endl;
    }

    return 0;
}