$\underline{\text { Khachaturyan A.V. }}$

The robot invented a cipher for writing words: he replaced some letters of the alphabet with single or double-digit numbers, using only the digits 1, 2, and 3 (different letters he replaced with different numbers). First, he wrote himself in code: РОБОТ = 3112131233. After encrypting the words КРОКОДИЛ and БЕГЕМОТ, he was surprised to notice that the numbers turned out to be exactly the same! Then the Robot wrote the word МАТЕМАТИКА. Write the number that he got.
Let's consider the word ROBOT $=3112131233$. It contains 5 letters and 10 digits, so all codes are two-digit and can be determined easily. Let's write down all twelve possible codes and the letters we definitely know:

$$
\begin{array}{llll}
1= & 11= & 21= & 31=\mathrm{P} \\
2= & 12=\mathrm{O} & 22= & 32= \\
3= & 13=\mathrm{B} & 23= & 33=\mathrm{T}
\end{array}
$$

Now let's think about how the word КРОКОДИЛ = БЕГЕМОТ would be written. It starts with Б = 13, so К = 1. Now we can write the beginning of the word:

KPOKO... = $13112112 \ldots$

We start reading it as the word БЕГЕМОТ: $Б=13, \mathrm{E} \neq 1$, so $\mathrm{E}=11$, and then $\Gamma=2$, otherwise the second $\mathrm{E}$ would not work. And М starts with 2, so $\mathrm{M}=2 *$. Now let's look at the end of the word, where ...ОТ, so ...1233. This means that $Л=3$ and И $=23$, and Д ends with 1, so Д = *1. The asterisk is the only remaining undeciphered digit.

It's not hard to figure out: $31=\mathrm{P}, 11=\mathrm{E}$, so $Д=* 1=21$. Then $\mathrm{M}=22$, and we have almost fully deciphered the code:

$$
\begin{array}{llll}
1=\mathrm{K} & 11=\mathrm{E} & 21=\mathrm{D} & 31=\mathrm{P} \\
2=\Gamma & 12=\mathrm{O} & 22=\mathrm{M} & 32= \\
3=\mathrm{J} & 13=\mathrm{B} & 23=\mathrm{V} & 33=\mathrm{T}
\end{array}
$$

Now we know everything we need to write the word МАТЕМАТИКА in code, except one thing - how the letter А is encoded. But since Robot was able to write this word, there must be a code for А. And this code is 32, because all the others have been used.

## Answer

2232331122323323132.