$M$ noetherian, $f$ endomorphism of $M$, $\operatorname{coker}f$ has finite length, then $\operatorname{coker}f^n$ and $\ker f^n$ have finite length. 
Let $M$ be noetherian and let $f$ be an endomorphism of $M$. Suppose that $\operatorname{coker}f$ has finite length. Prove that both $\operatorname{coker}f^n$ and $\ker f^n$ have finite length ($n=1,2,...$).

If $M$ is noetherian, then the intersection of $\operatorname{im}f^n$ and $\ker f^n$ equals $0$ for some $n$. On the other hand, by Jordan-Holder theorem, $\operatorname{coker}f$ is both noetherian and artinian, but I have no idea to continue.
I needs some hints to prove it.
Thank you in advance.

First, if $\text{coker}\ f$ is Artinian, then so is $\text{coker}\ f^m$ for all $m\geq 1$: it suffices to check this for $m=2$, and in this case, note that there is an epimorphism $$\text{coker}\ f\twoheadrightarrow\text{im} f / \text{im} f^2$$ and a short exact sequence $$0\to\text{im}\ f / \text{im}\ f^2\to\text{coker}\ f^2\to \text{coker}\ f\to 0.$$It remains to show that all $\text{ker}\ f^m$ are Artinian. For that, note that since $\text{ker}(f^n)\subseteq\text{ker}(f^m)$ for $m\geq n$ (and, as we have already seen, all $\text{coker}\ f^m$ are Artinian again), we may without loss of generality replace $f$ by $f^m$ for any $m\geq 1$. Now since $X$ is Noetherian, there is $m\gg 0$ such that $\text{ker}\ f^m=\text{ker}\ f^{m+1}$, so replacing $f$ by $f^m$ we may therefore assume right from the beginning that $\text{ker}\ f=\text{ker}\ f^2$. Then $\text{ker}(f)\cap\text{im}(f)=0$, hence $\text{ker}\ f\hookrightarrow X\twoheadrightarrow\text{coker}\ f$ is injective and $\text{ker}\ f$ is Artinian as a subobject of an Artinian object.
