7・110 In the castle, there are 3 buttons numbered $1,2,3$. The password to open the castle is a 3-digit number. To ensure the castle can be opened, what is the minimum number of times the buttons need to be pressed? (The castle can only be opened when the correct 3-digit sequence is pressed consecutively and in the correct order.)



The above text translated into English, preserving the original text's line breaks and format, is as follows:

7・110 In the castle, there are 3 buttons numbered $1,2,3$. The password to open the castle is a 3-digit number. To ensure the castle can be opened, what is the minimum number of times the buttons need to be pressed? (The castle can only be opened when the correct 3-digit sequence is pressed consecutively and in the correct order.)
[Solution] Since there are 27 different 3-digit numbers that can be formed using the digits $1, 2, 3$, it is sufficient to press a long string of digits that contains all 27 3-digit numbers. Clearly, except for the first two digits pressed, each digit from the 3rd one onwards is the unit digit of a 3-digit number (for example, in 23132, there are 3 3-digit numbers: 231, 313, and 132, whose unit digits are the last 3 digits of the 5 digits). Therefore, to press all 27 3-digit numbers, at least 29 button presses are required.

On the other hand, when the sequence of 29 button presses is as follows:
$$
11123222133313121223113233211 \text{, }
$$
each of the 27 3-digit numbers appears exactly once, so the castle can be opened.
In summary, to open the castle, the minimum number of button presses required is 29.