Complex sentence: Code all these distances logarithmically in their length in the correct order (of passes and keys) allows to reconsttruct the unsorted list from the sorted list.
Split into simpler sentences: Code all these path lengths logarithmically in their length in the correct order (of passes and keys). This allows to reconstruct the unsorted list from the sorted list.