Lexicographic sorting.