Let $m\geq 3$ be a positive odd number and let $M$ be the $m\times m$ matrix defined by $$M=\begin{bmatrix}0&1&0&0&\cdots&0\\ 0&0&1&0&\cdots &0\\ 0&0&0&1&\cdots &0\\ \vdots&\vdots&\vdots&\vdots&\ddots&\vdots\\ 0&0&0&0&\cdots &1\\ 1&-2&2&-2&\cdots&2\end{bmatrix}.$$
It can be proven that $M^{2m}=I_m$, the identity matrix of size $m$. Now I would like to compute the $k$-th power of $M$ for $k=0,1,\ldots,2m-1$. My observation is as follows:
Let $N$ be the $(2m)\times m$ matrix defined by
$$N=\begin{bmatrix} 1&0&0&0&\cdots&0&0\\ 0&1&0&0&\cdots&0&0\\ 0&0&1&0&\cdots &0&0\\ 0&0&0&1&\cdots &0&0\\ \vdots&\vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\ 0&0&0&0&\cdots &1&0\\ 0&0&0&0&\cdots &0&1\\ 1&-2&2&-2&\cdots&-2&2\\ 2&-3&2&-2&\cdots&-2&2\\ 2&-2&1&-2&\cdots&-2&2\\ 2&-2&2&-3&\cdots&-2&2\\ \vdots&\vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\ 2&-2&2&-2&\cdots&-3&2\\ 2&-2&2&-2&\cdots&-2&1\\ \end{bmatrix}.$$
We call the top row of $N$ the $0$-th row. Then for $k=0,1,\ldots,2m-1,2m$, $M^k$ is obtained from $N$ by taking the $k\!\pmod{2m}$-th row, $(k+1)\!\pmod{2m}$-th row, etc., up to the $(k+m-1)\!\pmod{2m}$-th row and form a matrix. For example, $$M^2=\begin{bmatrix} 0&0&1&0&\cdots &0&0\\ 0&0&0&1&\cdots &0&0\\ \vdots&\vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\ 0&0&0&0&\cdots &1&0\\ 0&0&0&0&\cdots &0&1\\ 1&-2&2&-2&\cdots&-2&2\\ 2&-3&2&-2&\cdots&-2&2 \end{bmatrix}.$$
while $$M^{2m-1}=\begin{bmatrix}2&-2&2&-2&\cdots&-2&1\\1&0&0&0&\cdots&0&0\\ 0&1&0&0&\cdots&0&0\\ 0&0&1&0&\cdots &0&0\\ 0&0&0&1&\cdots &0&0\\ \vdots&\vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\ 0&0&0&0&\cdots &1&0\\\end{bmatrix}$$
This seems to be an interesting way to compute the powers of the matrix $M$, but I am not sure how to verify this method, though some specific examples seem to suggest that this method is valid. Could anyone help with proving this method?