Hint 8-22

Find the longest chain first and then give the branches the lowest number.