Given: $$p = \begin{bmatrix} 1 &2 &3 &4 &5 &6 &7 &8 &9 \\ 1&5 &7 &4 &6 &9 &3 &2 &8 \end{bmatrix}$$ How would I go about determining $k$ such that: $$p^k = \begin{bmatrix} 1 &2 &3 &4 &5 &6 &7 &8 &9 \\ 1&2 &3 &4 &5 &6 &7 &8 &9 \end{bmatrix}$$
I know I can continuously multiply the permutations till I reach the answer but is there a quicker or "right way" of determining the answer?