Sorted returns the sorted sequence