When you look at the n/10 number lines, can you find any section which matches your goal? The goal is, for 3 inputs in a row, the first output is the smallest, and the second and third outputs are equal. You could be more specific by also requiring them to be 1 apart, but it might be fixable if they aren’t.
If you can find a section that does the right type of transformation, then the other issue is how to use it.