Let $p$ be an odd prime number.
Let $A\in M_{n\times n}(\mathbb{Z})$ be a matrix satisfiying $a_{ij}\equiv \delta_{ij}\pmod{p}$.
Prove that: if $|\det(A)|=1$ and $A^m=I$ for some $m\in\mathbb{N}^+$, then we have $A=I$.
I tried to write $A$ as $pX+I$ where $X\in M_{n\times n}(\mathbb{Z})$. Then there is an annihilation polynomial of $X$ by $(pX+I)^m=I$, and the problem turns to be proving $X=O$. But I don't know how to complete this proof.