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

void main()
{
    iota(readln().chomp().to!int()).map!(_=>readln().chomp().replace("Hoshino","Hoshina")).array().join("\n").writeln();
}