#include <string>
#include <iostream>
#include <cstdio>
int main(){
	int n;
	scanf("%d", &n);
	std::string s;
	for(int i=0;i<n;++i){
		std::getline(std::cin,s);
		while(s.find("Hoshino") != std::string::npos){
			s[s.find("Hoshino")+6]='a';
			//std::cout<<s.find("Hoshino")<<std::endl;
		}
		//std::cout<<"tes"<<std::endl;
		std::cout<<s<<std::endl;
	}
	return 0;
}