import std.stdio, std.string, std.conv;

void main() {
	auto n = readln.chomp.to!int;
	string[] result;
	foreach (i; 0..n) {
		result ~= readln.chomp.replace("Hoshino", "Hoshina");
	}
	foreach (r; result) r.writeln;
}