#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <map>
#include <cstdio>
#include <cstdlib>

#define rep(i, n) for(int i = 0; i < n; i ++)
#define ALL(T) T.begin(), T.end()

using namespace std;

typedef pair<int, int> pii;
typedef unsigned long long ull;

int main(void){
    int n; cin >> n;
    cin.ignore();

    while(n --){
        string in; getline(cin, in);
     
        while(1){
            int diff;
            if(!~(diff = in.find("Hoshino"))) break;
            in.replace(diff, 7, "Hoshina");
        }
        cout << in << endl;
    }

    return 0;
}