Assume natural number $n\ge2$. Amin and Ali take turns playing the following game:
In each step, the player whose turn has come chooses index $i$ from the set $\{0,1,\cdots,n\}$, such that none of the two players had chosen this index in the previous turns; also this player in this turn chooses nonzero rational number $a_i$ too. Ali performs the first turn. The game ends when all the indices $i\in\{0,1,\cdots,n\}$ were chosen. In the end, from the chosen numbers the following polynomial is built:
$$P(x)=a_nx^n+\cdots+a_1x+a_0$$
Ali's goal is that the preceding polynomial has a rational root and Amin's goal is that to prevent this matter.
Find all $n\ge2$ such that Ali can play in a way to be sure independent of how Amin plays achieves his goal.


1. **Ali's Strategy for Even \( n \):**
   - Ali performs the last move when \( n \) is even.
   - Assume all coefficients except \( a_k \) have been determined.
   - Ali can choose an arbitrary rational number \( q \) that is not a root of \( Q(x) = \sum_{i \neq k} a_i x^i \).
   - Ali then sets \( a_k = -\frac{Q(q)}{q^k} \), ensuring that \( q \) is a root of \( P(x) \).

2. **Amin's Strategy for Odd \( n \):**
   - Amin performs the last move when \( n \) is odd.
   - We need to show that Amin can choose the last coefficient such that the polynomial does not have a rational root.

3. **Lemma:**
   - If in a nonlinear polynomial with rational coefficients \( \sum_{i=0}^n a_i x^i \), all coefficients except one have been determined, it is possible to set the last coefficient such that the polynomial does not have a rational root.

4. **Proof of Lemma:**
   - **Case 1: \( i \neq 0, n \):**
     - Assume the common denominator of all specified coefficients is \( k \).
     - If \( a_i \) is chosen as an integer, and \( \frac{a}{b} \) is a root of the polynomial, then \( a \mid k a_0 \) and \( b \mid k a_n \).
     - There are finitely many possible rational roots. Choose \( a_i \) such that none of these numbers are roots of \( P(x) \).

   - **Case 2: \( i = 0 \):**
     - Consider the polynomial \( Q(x) = \sum_{i=1}^n a_i x^i \).
     - We need to show that there exists a rational number such that \( Q(x) = -a \) does not have a rational root.
     - If \( a \) is an integer, the denominator of every possible root of such an equation divides \( k a_0 \).
     - Choose \( x_0 \) large enough such that for \( x > x_0 \), \( Q(x + \frac{1}{k a_0}) > Q(x) + 1 \).
     - If \( Q(x_0) = n \), then for all \( b \), \( Q(x_0 + \frac{b}{k a_0}) > n + 1 \). Thus, \( Q(x) = n + 1 \) does not have a rational root.

   - **Case 3: \( i = n \):**
     - Consider the polynomial \( R(x) = \sum_{i=0}^n a_{n-i} x^i \).
     - The roots of \( P(x) \) and \( R(x) \) are inverses of each other.
     - Solve the problem for \( R(x) \), reducing it to the previous case.

5. **Conclusion:**
   - For even \( n \), Ali can ensure the polynomial has a rational root.
   - For odd \( n \), Amin can ensure the polynomial does not have a rational root.

\(\blacksquare\)

The final answer is \( \boxed{ n } \) is even.