There is nothing in this problem statement that says to sort the numbers.
"More precisely..." means that the statement to follow will make the previous statement more precise.
"rewrite small numbers from input to output"
Input is where the numbers are read from. Output is where the numbers get printed to. Rewrite means to copy. The problem is asking you to read the numbers from input and write them to output. Stop when the number is 42.
Keeping the numbers one or two digits keeps the problem simple. It also allows for some creative solutions.
If you need more clarification, please post again.