Constructing basic arborescence