Question is like in title:
For positive integer $n$ I want to construct a polynomial $w(x)$ of degree $n$ with integer coefficients such that there exist $a_1<a_2<\cdots<a_n$ (integer numbers) satisfying $w(a_1)=w(a_2)=\cdots=w(a_n)=1$ and $b_1<b_2<\cdots<b_n$ (also integer numbers) satisfying $w(b_1)=w(b_2)=\cdots=w(b_n)=-1$.
I am not sure if such polynomial even exists for every $n$.
EDIT: $a_i, b_i$ are not predetermined, as someone mentioned in a comment.