#include<stdio.h>
#include<stdlib.h>
#include<string.h>

#define text 1002

char *name="Hoshina";
char *wrong_name="Hoshino";
char *delim=" ";
char *ctx;

int main(void){
	int i,j,n,length,count,now;
	char buf[2];
	char istr[text],istr_cpy[text],*next;

	scanf("%d",&n);
	fgets(buf,sizeof(buf),stdin);
	for(i=0;i<n;i++){
		fgets(istr,sizeof(istr),stdin);
		length=strlen(istr);
		istr[length-1]='\0';

		for(j=0;j<length;j++) istr_cpy[j]=istr[j];
		istr_cpy[j]='\0';

		now=count=0;
		next = strtok_s(istr, delim, &ctx);
		while(next){
			if(strcmp(wrong_name, next)==0){
				for(j=count;j>=0;now++){
					if(j==0)break;
					if(istr_cpy[now]==' '){
						j--;
					}
				}
				for(j=0;j<7;j++){
					istr_cpy[now+j]=name[j];
				}
			}
			count++;
			next = strtok_s(NULL, delim, &ctx);
		}

		printf("%s\n",istr_cpy);
	}
	
	return 0;
}