Find all polynomials $f(x)$ with integer coefficients such that the coefficients of both $f(x)$ and $[f(x)]^3$ lie in the set $\{0,1, -1\}$.


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