Solved the lexicographic one.