Let's write down the number 123 thirty times in a row on a piece of paper:

$12312312 \ldots 3123$

What is the maximum number of pieces the paper can be cut into so that each piece has a different number?
To get as many pieces as possible, we try to produce as many small numbers as we can.

A single-digit number can contain at most 3 different digits, since we only have 3 different digits. Since the order of the numbers is fixed, and the leading digit can only be 3 different ones, this is true for any number of digits; that is, from any number of digits, we can produce at most 3 different numbers.

Let's create the following table:

| Number of digits; | Number of pieces; | Number of digits used; | Total digits used; |
| :---: | :---: | :---: | :---: |
| 1 | 3 | 3 | 3 |
| 2 | 3 | 6 | 9 |
| 3 | 3 | 9 | 18 |
| 4 | 3 | 12 | 30 |
| 5 | 3 | 15 | 45 |
| 6 | 3 | 18 | 63 |
| 7 | 3 | 21 | 84 |

So far, we have used a total of 84 digits, and with 21 cuts, we have obtained 22 pieces of numbers. The remaining six-digit number must have already appeared among the previously cut six-digit numbers. By further breaking it down, we cannot obtain a number different from the ones we have already obtained, as they have all already appeared. The only option left is to add a previously cut number—of at least two digits—to it; this way, we will necessarily get a number that has not appeared before. Therefore, the strip can be cut into at most 21 pieces.

The following example demonstrates that such a cutting is indeed possible:

![](https://cdn.mathpix.com/cropped/2024_05_02_74cfe3120f96b571d17eg-1.jpg?height=255&width=1119&top_left_y=978&top_left_x=492)