4. In the multi-story fraction

$$
P+\frac{1}{A+\frac{1}{B+\frac{1}{H+\frac{1}{0}}}}
$$

digits other than zero were substituted for the letters. What is the smallest result that can be obtained in this case? (As usual, different letters correspond to different digits).
Answer. $1+\frac{1}{9+\frac{1}{2+\frac{1}{8+\frac{1}{3}}}}=1 \frac{53}{502}$.

Solution. Let the entire fraction be T and write

$$
\mathrm{T}=\mathrm{P}+\frac{1}{X}, \quad X=\mathrm{A}+\frac{1}{Y}, \quad Y=\mathrm{B}+\frac{1}{\mathrm{Z}}, \quad Z=\mathrm{H}+\frac{1}{\mathrm{O}}
$$

Notice that all numbers X, Y, Z are greater than 1, so the second terms in the first three expressions are less than 1. If the first term is changed, it will change by at least 1, meaning the sum will also change in the same direction (the second term can change by less than 1 and will not compensate for the change in the first term). Therefore, T is smaller the smaller P is, so we should take $\mathrm{P}=1$. Also, T is smaller the larger X is, so A should be as large as possible, i.e., $\mathrm{A}=9$. The number X is larger the smaller Y is, i.e., the smaller B is. Therefore, $\mathrm{B}=2$. At the same time, Y is smaller the larger Z is. The maximum Z is achieved with the maximum $\mathrm{H}=8$ and the minimum $\mathrm{O}=3$, from which we get the answer.

Criteria. Full solution - 7 points. Correct answer without justification - 2 points.