I have tried the problem in the following manner but I haven't got any solution.
Let $\lambda$ be an eigenvalue of $M$, then $\exists v\ne 0$ such that $Mv=\lambda v\implies M^3 v=\lambda^3v\implies Iv=\lambda^3v$
$\implies\lambda^3$ is an eigenvalue of the $n\times n$ identity matrix
$I\implies |I-\lambda^3I|=0\implies(1-\lambda^3)^n=0$ $\implies(\lambda^2+\lambda+1)^n=0$ since $\lambda\ne 1$, given that $Mv\ne v$.
Now, from this I can conclude nothing?
Can anybody derive a solution for this problem?
If $n$ is odd, then $M$ has some real eigenvalue $\lambda$. Since $M^3=\operatorname{Id}_3$, $\lambda^3=1$, which is equivalent to the assertion that $\lambda=1$. So, if $v$ is an eigenvector of $M$ with eigenvalue $1$, $M.v=\lambda v=v$.