import std.conv;
import std.regex;
import std.stdio;
import std.string;

void main(){
    foreach(i; 0..readln.chomp.to!int){
        string s = readln.chomp;
        writeln(replace(s, regex("Hoshino", "g"), "Hoshina"));
    }
}