Arranging numbers in ascending order