The program rewires an undirected network preserving its degree sequence