Earlier I asked you So if there is a a:b and b:c somewhere in the dict you will include all of a b c in the other list and sort them?
and you said yes, in your dict, I see 2:6
and 6:7
which according to your comments will result in 2,6,7 being included in the result... I believe my solution is the correct answer to the question you have asked here, but it seems like that your actual problem is different from the question you have asked, you can ask a new question and correctly describe your actual problem if you want and maybe we will be able to help you then...