Let $P$ be a polynomial and suppose $f : \Bbb{C}\longrightarrow \Bbb{C}$ is a nonconstant analytic function such for all $z \in \Bbb{C}, f(z) = f(P(z))$. Clearly when $P$ is linear we can find such $f$. what happens when $P$ is not linear ? Any suggestion would be helpful.

Here is a more conventional proof:) Let $M(r)=\max\{f(z):z=r\}$. Maximum principle implies that this function is strictly increasing (unless $f$ is constant). This gives a contradiction because P(z)>z when $z$ is sufficiently large, and $P$ is of degree greater than $1$. 


If the degree of $P$ is greater than $1$ then the Julia set $J$ of $P$ is a nonempty perfect compact set of $\mathbb C$, completely invariant by $P$. Obviously $f$ is constant on any orbit $(P^{\circ n}(z))_n$. It is well known that most orbits of points of $J$ are dense in $J$, so that $f$ must be constant on $J$ (and therefore constant everywhere). 

