#include <iostream>
#include <string>

int main(){
	int n;
	std::cin >> n;
	std::cin.ignore();
	
	while(n--){
		std::string Eng;
		getline(std::cin, Eng);
		std::string::size_type pos = 0;
		while((pos = Eng.find("Hoshino", pos)) != std::string::npos){
			Eng.replace(pos, 7, "Hoshina");
			pos += 7;
		}
		std::cout << Eng << std::endl;
	}
	
    return 0;
}