Nonzero real numbers $x_1, x_2, \ldots, x_n$ satisfy the following condition:

$$x_1 - \frac{1}{x_2} = x_2 - \frac{1}{x_3} = \ldots = x_{n-1} - \frac{1}{x_n} = x_n - \frac{1}{x_1}$$

Determine all $n$ for which $x_1, x_2, \ldots, x_n$ have to be equal.

[i](Proposed by Oleksii Masalitin, Anton Trygub)[/i]
Given the condition:
\[ x_1 - \frac{1}{x_2} = x_2 - \frac{1}{x_3} = \ldots = x_{n-1} - \frac{1}{x_n} = x_n - \frac{1}{x_1} \]
we need to determine all \( n \) for which \( x_1, x_2, \ldots, x_n \) must be equal.

1. Let the common value of the differences be \( c \). Thus, we have:
   \[ x_i - \frac{1}{x_{i+1}} = c \quad \text{for all } i \]
   This can be rewritten as:
   \[ x_{i+1} = \frac{1}{x_i - c} \]

2. To find a general form, we iterate this relation. Starting with \( x_1 \):
   \[ x_2 = \frac{1}{x_1 - c} \]
   \[ x_3 = \frac{1}{x_2 - c} = \frac{1}{\frac{1}{x_1 - c} - c} = \frac{x_1 - c}{1 - c(x_1 - c)} \]

3. Continuing this process, we need to ensure that \( x_{n+1} = x_1 \). This implies:
   \[ x_{n+1} = \frac{1}{x_n - c} = x_1 \]

4. To simplify, assume \( x_1 = x_2 = \ldots = x_n = x \). Then:
   \[ x - \frac{1}{x} = c \]
   \[ x^2 - cx - 1 = 0 \]

5. The quadratic equation \( x^2 - cx - 1 = 0 \) has solutions:
   \[ x = \frac{c \pm \sqrt{c^2 + 4}}{2} \]

6. For \( x_1, x_2, \ldots, x_n \) to be equal, the sequence must be consistent. If \( x_i \neq x_{i+1} \), then the sequence must cycle back to \( x_1 \) after \( n \) steps. This implies:
   \[ x_{n+1} = x_1 \]

7. For the sequence to cycle back, the product of transformations must be the identity. This is possible if and only if \( n \) is odd. If \( n \) is even, the transformations will not cycle back to the original value.

8. Therefore, \( n \) must be odd for \( x_1, x_2, \ldots, x_n \) to be equal.

The final answer is \( \boxed{\text{Any odd } n} \)