gets.to_i.times do |variable|
    line = gets
    a=Array.new(1000) { |i|  }
    a=line.split(" ")
    for i in 0..1000 do
        if a[i]=='Hoshino' then
            a[i]='Hoshina'
        end
        if a[i]=='Hoshino,' then
            a[i]='Hoshina,'
        end
        if a[i]=='Hoshino.' then
            a[i]='Hoshina.'
        end
    end
    print a.join(" ")
    print "\n"
end