1021. Let's write down the digits from 0 to 9 in a row: \(0, 1, 2, 3, \ldots, 9\) and consider the sequence of sums of two adjacent digits:

\[
1 ; 3 ; 5 ; 7 ; 9 ; 11 ; 13 ; 15 ; 17
\]

In this sequence, each term, starting from the second, is 2 more than the previous one. Arrange the digits \(0, 1, 2, \ldots, 9\) so that in the new sequence of sums of two adjacent digits, each term, starting from the second, is 1 more than the previous one.
Let's denote the desired sequence of digits as

$$
a_{1} ; a_{2} ; a_{3} ; \ldots ; a_{10}
$$

Then the new sequence of pairwise sums is

$$
a_{1}+a_{2} ; \quad a_{2}+a_{3} ; \quad a_{3}+a_{4} ; \quad a_{4}+a_{5} ; \ldots ; \quad a_{9}+a_{10}
$$

which is an arithmetic progression with a common difference of 1.

The sum of the terms of the original sequence of digits is

$$
0+1+2+\ldots+9=\frac{1+9}{2} \cdot 9=45
$$

Therefore, the sum of the terms of the new sequence of digits is also 45.

Let's express the sum $S$ of the terms of the new sequence of sums in two ways. First, as follows:

$$
\begin{gathered}
S=\left(a_{1}+a_{2}\right)+\left(a_{2}+a_{3}\right)+\left(a_{3}+a_{4}\right)+\ldots+\left(a_{9}+a_{10}\right)= \\
=\left(a_{1}+a_{2}+a_{3}+\ldots+a_{10}\right)+\left(a_{2}+a_{3}+\ldots+a_{9}\right)= \\
=45+\left(45-a_{1}-a_{10}\right)=90-a_{1}-a_{10} .
\end{gathered}
$$

Secondly, using the formula for the sum of $n$ terms of an arithmetic progression:

$$
S_{n}=\frac{2 a_{1}+d(n-1)}{2} n
$$

Here, $d=1, n=9$, and the role of the first term of the progression is played by $a_{1}+a_{2}$. We get:

$$
S=\frac{2\left(a_{1}+a_{2}\right)+8}{2} \cdot 9=\left(a_{1}+a_{2}+4\right) \cdot 9
$$

Now, let's equate the two expressions for $S$:

$$
90-a_{1}-a_{10}=\left(a_{1}+a_{2}+4\right) \cdot 9
$$

From this, the sum $a_{1}+a_{10}$ is divisible by 9, i.e., it is equal to 9. Then

$$
90-9=\left(a_{1}+a_{2}+4\right) \cdot 9, \quad 9=a_{1}+a_{2}+4, \quad a_{1}+a_{2}=5
$$

Thus, the sum $a_{1}+a_{2}$ is equal to 5. But this sum is the smallest of all pairwise sums, so one of the numbers $a_{1}$ and $a_{2}$ is zero. Let's consider two cases.

1) Suppose $a_{1}=0$.

Then

$a_{2}=5, a_{3}=1$ (since the sum $a_{2}+a_{3}$ is 1 more than the sum $a_{1}+a_{2}=5$),

$a_{4}=6, a_{5}=2, a_{6}=7, a_{7}=3, a_{8}=8, a_{9}=4, a_{10}=9$.

We get the sequence of digits:

$$
0 ; 5 ; 1 ; 6 ; 2 ; 7 ; 3 ; 8 ; 4 ; 9
$$

2) Suppose $a_{2}=0$.

In the same way, we find the sequence:

$$
5 ; 0 ; 6 ; 1 ; 7 ; 2 ; 8 ; 3 ; 9 ; 4
$$

(Try to independently analyze the case when, for example, $a_{1}=1, a_{2}=4$.)

Answer: $0 ; 5 ; 1 ; 6 ; 2 ; 7 ; 3 ; 8 ; 4 ; 9$ or $5 ; 0 ; 6 ; 1 ; 7 ; 2 ; 8 ; 3 ; 9 ; 4$.