#include <iostream>
#include <string>

int main(){
	int n; // the number of datasets
	std::cin >> n;

	for(int i = 0; i < n; ++i){
		std::string text;
		std::getline(std::cin, text); // input

		int text_size = text.size();
		int moji = 0;
		while(moji < text_size){
			moji = text.find("Hoshino", moji);
			text.replace(moji, 7, "Hoshina");
		}
		
		std::cout << text << std::endl; //output
	}

	return 0;
}