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