#include <iostream>
#include <string>

int main(){
	std::string str;
	int num;
	int start = 0;

	std::cin >> num;

	for(int i=0; i<num; ++i){

		std::cin >> str;

		while(start != -1){

			if(start == 0){ //for first loop
				start = (int)str.find("Hoshino", start);
			}else{
				start = (int)str.find("Hoshino", start+8);
			}

			if(start != -1){ //for first loop
				str.replace(start, start+7, "Hoshina");
			}

		}

		std::cout << str << std::endl;
	}

}