module AOJ_Volume0101;

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

int main()
{
	int n = readln.chomp.to!int;
	while(n--)
	{
		string s = readln.chomp;
		replace(s,"Hoshino","Hoshina").writeln;
	}
	return 0;
}