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

int main()
{
	int datasets;
	scanf("%d\n", &datasets);
	
	for (int i=0; i<datasets; i++) {
		std::string str;
		getline(std::cin, str);
		//std::cout << str << std::endl;
		int offset = 0;
		while (true) {
			int pos = str.find("Hoshino", offset);
			if ( pos != std::string::npos ) {
				str.replace(pos, 7, "Hoshina");
				offset = pos + 7;
			} else {
				break;
			}
		}
		std::cout << str << std::endl;
	}
	
	return 0;
}

