6. Unlocking the communicator is done by entering a 4-digit numerical code on the touch screen. The arrangement of digits on the keyboard changes after entering the code depending on a random prime number $k$ from 7 to 2017, and the digit $i$ is displayed as $a_{i}$, which is the last digit of the number $i k$. The user enters digits from the left column with the left hand, and the rest with the right hand. Restore the lock code if it is known that when entering the code, the user entered the digits as follows:

when $a_{3}=3$ - right, right, left, right;

when $a_{3}=9$ - left, left, left, left;

when $a_{3}=1$ - right, right, right, right;

when $a_{3}=7$ - left, right, right, right.

In your answer, specify the obtained code.

| 1 | 2 | 3 |  |
| :--- | :--- | :--- | :---: |
| 4 | 5 | 6 |  |
| 7 | 8 | 9 |  |
| 0 |  |  |  |
|  |  |  |  |


| $\mathrm{a}_{1}$ | $\mathrm{a}_{2}$ | $\mathrm{a}_{3}$ |
| :---: | :---: | :---: |
| $\mathrm{a}_{4}$ | $\mathrm{a}_{5}$ | $\mathrm{a}_{6}$ |
| $\mathrm{a}_{7}$ | $\mathrm{a}_{8}$ | $\mathrm{a}_{9}$ |
|  |  | $\mathrm{a}_{0}$ |
|  |  |  |
|  |  |  |
6. Unlocking the communicator is done by entering a 4-digit numerical code on the touch screen. The arrangement of digits on the keyboard changes after entering the code depending on a random prime number $k$ from 7 to 2017, and the digit $i$ is displayed as $a_{i}$, which is the last digit of the number $i k$. The user enters digits from the left column with the left hand, and the rest with the right hand. Restore the lock code if it is known that when entering the code, the user entered the digits as follows:

when $a_{3}=3$ - right, right, left, right;

when $a_{3}=9$ - left, left, left, left;

when $a_{3}=1$ - right, right, right, right;

when $a_{3}=7$ - left, right, right, right.

In the answer, specify the obtained code.

| 1 | 2 | 3 |  |
| :--- | :--- | :--- | :---: |
| 4 | 5 | 6 |  |
| 7 | 8 | 9 |  |
| 0 |  |  |  |
|  |  |  |  |

| $\mathrm{a}_{1}$ | $\mathrm{a}_{2}$ | $\mathrm{a}_{3}$ |  |  |
| :--- | :--- | :--- | :---: | :---: |
| $\mathrm{a}_{4}$ | $\mathrm{a}_{5}$ | $\mathrm{a}_{6}$ |  |  |
| $\mathrm{a}_{7}$ | $\mathrm{a}_{8}$ | $\mathrm{a}_{9}$ |  |  |
|  |  |  |  | $\mathrm{a}_{0}$ |
|  |  |  |  |  |

Answer: 3212.