#include <cstdio>
#include <string>
#include <iostream>

int main(){
	int n;
	std::cin>>n;
	while(--n){
		std::string s;
		std::getline(std::cin,s);
		while(s.find("Hoshino",0) != std::string::npos){
			s[s.find("Hoshino")+6]='a';
			//std::cout<<s.find("Hoshino")<<std::endl;
		}
		std::cout<<s<<std::endl;
	}
	return 0;
}