2. Petya wrote down five consecutive terms of an arithmetic progression and encrypted them according to the principle: each digit was replaced with a letter, different digits with different letters, and vice versa. Here's what he got: A, BS, DE, AV, CB. What numbers did Petya write?
Answer: $3,15,27,39,51$.

Solution. From the condition, it follows that the terms of the arithmetic sequence are natural numbers and the difference of the progression, denoted as $d$, is positive. We will consider the letters A, B, C, D, E as digits or numbers, and the corresponding two-digit numbers will be denoted as $\overline{\mathrm{A}}$ and so on.

Let's calculate the difference $\overline{\mathrm{CD}}-\overline{\mathrm{BC}}$ in two ways. First, using the fact that the numbers form an arithmetic sequence, we get $\overline{\mathrm{CD}}-\overline{\mathrm{BC}}=(\overline{\mathrm{BC}}+3 d)-\overline{\mathrm{BC}}=3 d$, then $\overline{\mathrm{CB}}-\overline{\overline{\mathrm{CC}}}=$ $(10 C+5)-(10 B+C)=9(C-B)$. Therefore, the difference of the progression is a multiple of three.

Now, for the difference $\overline{\mathrm{AB}}-\mathrm{A}$, we have $\overline{\mathrm{AB}}-\mathrm{A}=(10 \mathrm{~A}+\mathrm{B})-\mathrm{A}=9 \mathrm{~A}+\mathrm{B}=3 d$, and since $d$ is a multiple of three, then $\mathrm{B}$ is a multiple of 9. Since this is a digit, $\mathrm{B}$ is either $0$ or $9$.

Suppose $\mathrm{B}=0$. Then $3 d=9 \mathrm{~A}+\mathrm{B}=9 \mathrm{~A}$, i.e., $d=3 \mathrm{~A}$, and the terms of the progression are respectively $\mathrm{A}, \overline{\mathrm{BC}}=4 \mathrm{~A}, \overline{\mathrm{DE}}=7 \mathrm{~A}, \overline{\mathrm{AB}}=10 \mathrm{~A}, \overline{\mathrm{CE}}=13 \mathrm{~A}$. Therefore, $\overline{\mathrm{BC}}+\overline{\mathrm{CE}}=4 \mathrm{~A}+13 \mathrm{~A}=17 \mathrm{~A}$, and on the other hand $\overline{\mathrm{BC}}+\overline{\mathrm{CB}}=(10 \mathrm{E}+\mathrm{C})+(10 \mathrm{C}+\overline{\mathrm{E}})=11(\mathrm{B}+\mathrm{C})$. Since the numbers 11 and 17 are prime, it follows from the equality $11(\mathrm{B}+\mathrm{C})=17 \mathrm{~A}$ that the digit $\mathrm{A}$ is a multiple of 11, which is impossible.

It remains to consider the case when $\mathrm{B}=9$. In this case, $3 d=9 \mathrm{~A}+\mathrm{B}=9 \mathrm{~A}+9$, i.e., $d=3 \mathrm{~A}+3$, and the terms of the progression are respectively $\mathrm{A}, \overline{\mathrm{BC}}=4 \mathrm{~A}+3, \overline{\mathrm{DE}}=7 \mathrm{~A}+6, \overline{\mathrm{AB}}=10 \mathrm{~A}+9$ and $\overline{\mathrm{CB}}=13 \mathrm{~A}+12$. Therefore, $\overline{\mathrm{BC}}+\overline{\mathrm{CB}}=(10 \mathrm{~B}+\mathrm{C})+(10 \mathrm{C}+\mathrm{E})=11(\mathrm{~B}+\mathrm{C})=(4 \mathrm{~A}+3)+(13 \mathrm{~A}+12)=17 \mathrm{~A}+15=11(\mathrm{~A}+1)+2(3 \mathrm{~A}+2)$. Since 11 is a prime number, it follows from the equality $11(\mathrm{D}+\mathrm{C})=11(\mathrm{~A}+1)+2(3 \mathrm{~A}+2)$ that $3 \mathrm{~A}+2$ is a multiple of 11. Therefore, since $\mathrm{A}$ is a digit, $\mathrm{A}=3, \overline{\mathrm{BC}}=4 \mathrm{~A}+3=15$, $\overline{\mathrm{DE}}=7 \mathrm{~A}+6=27, \overline{\mathrm{AB}}=10 \mathrm{~A}+9=39$ and $\overline{\mathrm{CE}}=13 \mathrm{~A}+12=51$. These numbers satisfy the condition of the problem.