
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[]);
    for(uint i = 0; i < line.length - 6; i++) {
      if (line[i..(i + 7)] == "Hoshino") {
        line[i..(i + 7)] = "Hoshina";
      }
    }
    writeln(line);
  }
}