Lexicographically smallest ternary (#3143) - Basecamp