Lexicographically smallest ternary#3143

Lexicographically smallest ternary (Discussion)