Sorting nested lists [1]