#include <cstdio>
#include <cstring>
#include <iostream>

using namespace std;

int main(void)
{
	int N;
	

	scanf("%d", &N);
	cin.get();
	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;
}
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
#define BUFSIZE 1024

char buf[BUFSIZE];
int main()
{
	int n = atoi(fgets(buf, BUFSIZE, stdin)); 
	while (n--) {
		fgets(buf, BUFSIZE, stdin);
		for (int i = 0; i < strlen(buf); ++i) {
			if (strncmp(buf + i, "Hoshino", 7) == 0)
				buf[i+6] = 'a';
		}
		printf(buf);
	}
	return 0;
}