Problem 6. Vanya is coming up with a number consisting of non-repeating digits without zeros - a password for his phone. The password works as follows: if, without lifting his finger from the screen, he sequentially connects the points corresponding to the digits of the password with line segments, the phone will unlock. However, the phone does not allow connecting two points with a segment if there is a third point between them: if Vanya connects, for example, 1 and 3, the phone will "think" that Vanya is entering 1-2-3.

Vanya wants the line traced by his finger when entering the password not to intersect itself. Additionally, he wants that by rearranging the digits of the password, no other such line can be obtained, except in reverse order. For example, the password 1263 is not to Vanya's liking because the line $6-3-2-1$ is different but also does not have self-intersections.

Vanya came up with the password 723 (see the figure). These three digits - 2, 3, and 7 - indeed cannot be connected in any other way. It's a pity, though, that the password is so short.

Help Vanya come up with a longer password. In your answer, write the password itself and draw the only line that can be formed from these digits.

[8 points]

(I.V. Yashchenko)
Answer. For example, 12769. See the figure.

This password meets Vanya's requirements. Let's see how we can connect its digits without any intersections. The digit 7 must be connected to some digit, which can be either 2 or 6. Suppose, for example, we draw the segment $7-6$. Now 9 can only be connected to 6. Next, it is inevitable to draw the segments $7-2$ and $2-1$, and we get the line shown in the figure. If we had drawn $7-2$ instead of $7-6$ first, the line would have been the same. Thus, this line is unique.

Comment. Interestingly, it is impossible to come up with a four-digit password that meets Vanya's requirements. There is also no password with six or more digits. There are eight possible five-digit passwords: $12769,96721,14389,98341,32947,74923,78163,36187$. However, the lines for all eight passwords are of the same form, differing only in rotation, symmetry, or the direction of drawing.