import std.stdio, std.array, std.conv, std.algorithm, std.string, std.numeric, std.range;
void main() {
        auto n = readln.strip.to!int;
        for(int i = 0; i<n ; i++){
                auto s = readln.strip.replace("Hoshino", "Hoshina");
                writeln(s);
        }
}