Correct parenthesis for the lexicographic order