Let's find all quadratic polynomials of the form $a x^{2}+b x+c$ such that when we substitute the values of $a, b, c$ for $x$, we get the values of $a, b, c$ respectively.
The stated property is equivalent to the fact that the roots of the numbers \(a, b, c\) are the solutions to the equation

\[
a x^{2}+b x+c=x
\]

Since a quadratic equation can have at most two distinct roots, at least two of the numbers \(a, b, c\) must be equal. Since \(a\) is a root of (1.), we have

\[
a b+c=a-a^{3}=a\left(1-a^{2}\right)
\]

First, let's consider the case where both sides of this equation are 0. Since we are looking for a quadratic equation, \(a \neq 0\), so in this case \(a^{2}=1\).

If \(a=1\), then \(b+c=0\). If \(b=c=0\), this results in the polynomial \(x^{2}\). Otherwise, \(b\) and \(c\) cannot be equal, so one of them must be equal to \(a\). This gives us the polynomials \(x^{2}+x-1\) and \(x^{2}-x+1\), but only the first one is valid.

If \(a=-1\), then according to (2), \(b=c\), and the polynomial takes the form \(-x^{2}+b x+b\), which is valid for any \(b\).

Now, let's consider the case where both sides of (2) are not 0. In this case, \(b \neq c\), because otherwise (1) would only have \(b\) as a root if \(b^{2}(a+1)=0\), but then the left side of (2) would be 0. Therefore, \(a\) must be equal to either \(b\) or \(c\).

If \(a=b\), then \(c\) can only be a root of (1) if \(c^{2}+c=0\). Thus, \(c\) can be either -1 or 0. Substituting the first value into (2) brings us back to the already examined case \(a^{2}=1\), and the second value gives us the equation

\[
a^{2}+a=1
\]

which, for both roots of \(a\), results in the polynomial \(a\left(x^{2}+x\right)\) being valid.

If \(a=c\), then according to (2), \(b=-a^{2}\). Substituting this into (1) again brings us back to the already examined case \(a+1=0\). Therefore, the sought polynomials are:

\[
x^{2}, \quad x^{2}+x-1, \quad -x^{2}+b x+b, \quad a x^{2}+a x
\]

where \(b\) is arbitrary and \(a\) is one of the roots of (3).