ural 1005. DFS/0-1 packing