#include <iostream>
#include <string>

int main(){

	const std::string correct_word = "Hoshina";
	const std::string find_word = "Hoshino";
	
	int N;

	std::cin >> N;

	for(int i = 0; i < N; ++i){
	
		std::string str;
		std::cin >> str;

		std::string::size_type pos = str.find("Hoshino");
		
		while(pos != std::string::nops){

			 str.replace(pos, find_word.length(), correct_word);

			 pos = str.find(find_word, pos + find_word.length());
		}
	
	std::cout << str << std::endl;
	
	}
	return 0;
}