#include<iostream>
#include<string>
#include<cstdio>
using namespace std;

int main() {
	int n;
	string s;
	scanf("%d\n", &n);
	for (int i = 0; i < n; i++) {
		getline(cin, s);
		while (s.find("Hoshino") != string::npos) {
			s.replace(s.find("Hoshino"), 7, "Hoshina");
		}
		cout << s << endl;
	}
}
