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

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