On the table lay six cards with digits $1,2,3,4,5,6$. Anežka made a six-digit number from these cards, which was divisible by six. Then she started removing the cards from the right. When she removed the first card, a five-digit number divisible by five remained on the table. When she removed another card, a four-digit number divisible by four remained. As she continued removing cards, she successively obtained a three-digit number divisible by three and a two-digit number divisible by two.

What six-digit number could Anežka have originally made? Determine all possibilities.

(L. Růžičková)

Hint. What can you say about the individual digits of the sought number?
Let's denote the sought six-digit number as $\overline{a b c d e f}$. From the problem statement, we can derive several insights about this number:

1. The entire six-digit number is divisible by six, meaning it is divisible by both two and three. Divisibility by three is guaranteed because the sum of the digits is (regardless of the order of the addends) equal to $1+2+3+4+5+6=21$, which is a number divisible by three. Divisibility by two means that $f$ is one of the digits $2,4,6$.
2. The five-digit number $\overline{a b c d e}$ is divisible by five, so $e=5$.
3. The four-digit number $\overline{a b c d}$ is divisible by four, so the number $\overline{c d}$ is also divisible by four. In particular, $d$ is one of the digits $2,4,6$.
4. The three-digit number $\overline{a b c}$ is divisible by three, so the sum of the digits $a+b+c$ is divisible by three.
5. The two-digit number $\overline{a b}$ is divisible by two, so $b$ is one of the digits $2,4,6$.

Uniquely, $e=5$ and the digits $b, d, f$ are in some order $2,4,6$. The digits $a$ and $c$ are therefore 1 and 3. From the third condition, it follows that the two-digit number $\overline{c d}$ can be one of the numbers

$$
12, \quad 16, \quad 32, \quad 36 .
$$

For each of these possibilities, $a$ is uniquely determined: in the first two cases, $a=3$, in the remaining two cases, $a=1$, and the sum $a+c$ is always equal to 4. To satisfy the fourth condition, $b$ must be 2. Therefore, only two possibilities remain: Anežka could have formed 321654 or 123654.