#include<stdio.h>
int main(){
	char s[1100];
	int n;
	scanf("%d",&n);
	getchar();
	for(int i=0;i<n;i++){
		fgets(s,1100,stdin);
		int j;
		for(j=0;s[j]!='\0';j++)
			if(s[j]=='H'&&s[j+1]=='o'&&s[j+2]=='s'&&s[j+3]=='h'&&s[j+4]=='i'&&s[j+5]=='n'&&s[j+6]=='o')s[j+6]='a';
		printf("%s",s);
		s[0]='\0';}
	return 0;}
