<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

//$fp = fopen("input.txt", "r");
$fp = fopen("php://stdin", "r");
$n = (int)fgets($fp);

for($i = 0; $i < $n; $i++) {
    $buf = rtrim(fgets($fp));
    $sa = explode(" ", $buf);
    for($j = 0; $j < count($sa); $j++) {
        $tmp = $sa[$j];
        if($tmp === "Hoshino") {
            $tmp = "Hoshina";
        }
        echo $tmp;
        if($j < count($sa) - 1) echo " ";
    }
    if($i < $n - 1) echo "\n";
}
?>