import std.stdio;
import std.string:replace, chomp;

void main(){
	int n;
	string s;
	readf("%d\n", &n);
	for (int i = 0; i < n; i++) {
		s = chomp(readln());
		s = replace(s, "Hoshino","Hoshina");
		writeln(s);
	}
}