#include <cstdio>
#include <string>
#include <iostream>

using namespace std;

string s;

signed main()
{
    int n = 0;
    scanf( "%d\n", &n );
    while( 0 < n )
    {
        getline( cin, s );
        s = replace( s, "Hoshino", "Hoshina" );
        cout << s << endl;
        n--;
    }
    return 0;
}
