Calculate $\sum_{i=1}^{n} \prod_{j \neq i} \frac{x-a_{j}}{a_{i}-a_{j}}$ for $a_{1}, \ldots, a_{n} \in \mathbb{R}$ pairwise distinct.
This polynomial is of degree at most $n-1$ and is equal to 1 at $a_{i}$, hence it is identically equal to 1.