little script that generate netlist (one root and multiple leave switches)