#include<stdio.h>
#include<string.h>
int main(void)
{
	int ct;
	char *rp;
	char retu[1000],s[]="Hoshina";
	scanf_s("%d",&ct);
	fflush(stdin);
	for(int f1=0;f1<ct;f1++){
		gets_s(retu);
		while(1){
			if(strstr(retu,"Hoshino")==NULL){
				break;
			}
			if(rp=strstr(retu,"Hoshino")){
				rp+=6;
				*rp='a';
			}
		}
		printf("%s\n",retu);
	}
	return 0;
}