Select branches with highest second path number

Hello, I’d like to select branches with the highest second path number. So from the following tree, for example, I’d like to select the bold branches:

{0;3}
{0:4}
{0;5}
{1;4}
{1;5}
{1;6}
{1;7}
{2;6}
{2;7}
{2;8}
{2;9}

Thanks!

re_Last Branch.gh (7.1 KB)

2 Likes

Thank you!