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

int main(void)
{
	int n, i;
	char a[1000][1000] = {0};
	char *p;

	while (scanf("%d\n", &n) != EOF)
	{
		for (i = 0; i < n; i++)
			gets(a[i]);
		for (i = 0; i < n; i++)
		{
			p = strstr(a[i], "Hoshino");
			if (p != NULL)
				p[6] = 'a';
		}
		
		for (i = 0; i < n; i++)
			puts(a[i]);
	}
	return 0;
}