#include <iostream>
#include <cstring>
using namespace std;

int main(){
	long long int n;
	char* a;
	char letter[1000];
	cin >> n;
	while(1){
		for(int i=0 ; i<n ; i++){
			cin >> letter;
		}
		do {
			a=strstr(letter , "Hoshino");
			if (a==NULL) break;
			strncpy(a , "Hoshina" , 7);
			
		} while (a!='\0');
		cout << letter << endl;
		n--;
		if (!n) break;
	}
	return 0;
}
	