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

void main() {
  int times = readln.chomp.to!(int);
  foreach(t; 0..times) {
    dchar[] line = readln.chomp.dup.to!(dchar[]);
    if ( line.length >= 6) {
      for(uint i = 0; i < line.length - 6; i++) {
        if (line[i..(i + 7)] == "Hoshino") {
          line[i..(i + 7)] = "Hoshina";
        }
      }
    }
    writeln(line);
  }
}