Sorting three integers