#include <cstdio>
#include <cstring>

int main(void)
{
	int N;
	
	while(scanf("%d", &N) != EOF){
		fflush(stdin);
		while(--N, N>=0){
			char instr[1001];
			char *t;
	
			gets(instr);
			while( (t = strstr(instr, "Hoshino")) != NULL){
				t += 6;
				*t = 'a';
			}
	
			printf("%s\n", instr);
		}

	}
	

	return 0;
}