#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <sstream>
#include <cstdio>

using namespace std;

int main()
{
    int n;
    string str;
    cin >> n;
    cin.get();
    for(int i=0;i<n;++i)
    {
        getline(cin, str);
        stringstream ss(str);
        str.clear();
        ss >> str;
        if(str=="Hoshino") str = "Hoshina";
        else if(str=="Hoshino.") str = "Hoshina.";
        cout << str;
        while(ss >> str)
        {
            if(str=="Hoshino") str = "Hoshina";
            else if(str=="Hoshino.") str = "Hoshina.";
            cout << ' ' << str;
        }
        cout << endl;
    }
}