<?php
$fp = fopen("php://stdin", "r");
$n = (int)fgets($fp);
 
for($i = 0; $i < $n; $i++) {
    $buf = rtrim(fgets($fp));
    for($j = 0; $j < strlen($buf)-6; $j++) {
        if(isHoshino($buf, $j) ) $buf[$j+6] = 'a';
    }
    echo $buf;
    if($i < $n - 1) echo "\n";
}
 
function isHoshino($str, $pos) {
    if($str[$pos] != 'H') {
        return false;
    }
    if($str[$pos+1] != 'o') {
        return false;
    }
    if($str[$pos+2] != 's') {
        return false;
    }
    if($str[$pos+3] != 'h') {
        return false;
    }
    if($str[$pos+4] != 'i') {
        return false;
    }
    if($str[$pos+5] != 'n') {
        return false;
    }
    if($str[$pos+6] != 'o') {
        return false;
    }
    return true;
}
?>