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