#include <iostream>
#include <string>

using namespace std;

int main(void){
	int n;
	string str;
	cin >> n;
	cin.get();
	for(int i = 0;i < n;i++){
		getline(cin,str);
		while(str.find("Hoshino") != string::npos){
			int lc = str.find("Hoshino");
			lc += 6;
			str[lc] = 'a';
		}
		cout << str << endl;
	}
	return 0;
}