Sorted the elements alphabetically