Find the largest positive integer \(d\) for which there exists a degree $d$ polynomial $P$ with real coefficients such that there are at most $d$ different values among $P(0), P(1), \ldots, P\left(d^{2}-\right.$ $d)$.

Let's think step by step and output the final answer within \boxed{}.
user