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

using namespace std;

char str[1001];
char hoshino[] = "Hoshino";
int hlen = strlen(hoshino);

void changeHoshino(int len) {
	for (int i = 0; i <= len - hlen; i++) {
		int j = 0;
		while ((j < hlen) && (str[i+j] == hoshino[j]))
			j++;

		if (j == hlen)
			str[i+j-1] = 'a';
	}
}
int main() {
	int n;

	cin >> n;
	
	fgets(str, 1001, stdin);
	for (int i = 0; i < n; i++) {
		fgets(str, 1001, stdin);

		changeHoshino(strlen(str));

		cout << str;
	}

	return 0;
}