#include <iostream>
#include <string>


int n;
std::string str;
std::string strs[1000];


void solve();
void split();


void solve() {
	split();

	for (auto& var : strs) {
		if (var == "Hoshino") {
			var = "Hoshina";
		}

		std::cout << var;
	}

	std::cout << std::endl;

}

void split() {
	int i = 0, cnt = 0;
	std::string hoge;

	while (i < str.size()) {
		if (str[i] == ' ' || str[i] == ',' || str[i] == '.') {
			strs[cnt++] = hoge;
			hoge = "";
		}
		else {
			hoge += str[i];
		}

		i++;
	}

	strs[cnt] = hoge;
}


int main() {
	std::cin >> n;

	for (;  n >= 0; n--) {
		std::getline(std::cin, str);

		solve();
	}

	return 0;
}
