#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <stdio.h>
#include <string>
#include <string.h>
#include <queue>
#include <cmath>
#include <stack>
#include <map>
#include <vector>
#include <algorithm>

#define int64 long long int
using namespace std;

int main()
{
	int n, c, buf, len;
	char str[1024]={0};
	cin >> n;

	if((c = getchar()) == '\n')
	for(int i=0; i<n; i++){
		buf = 0;
		while(1){
			c = getchar();
			if(c == '\n' || c == EOF){
				str[buf] = '\0';
				break;
			}
			str[buf] = c;
			buf++;
		}
		len = strlen(str);
		for(int j=0; j<=len-7; j++){
			if(str[j] != 'H') continue;
			if(str[j+1] != 'o') continue;
			if(str[j+2] != 's') continue;
			if(str[j+3] != 'h') continue;
			if(str[j+4] != 'i') continue;
			if(str[j+5] != 'n') continue;
			if(str[j+6] != 'o') continue;
			str[j+6] = 'a';
		}
		printf("%s\n", str);
		memset(str, 0, 1024);
	}

	return 0;
}