I noticed that powers of complex numbers $a+bi$ tend to fall into a cycle modulo $\sqrt{a^2 + b^2}$. For example, $$(3+4i)^2 \equiv 3+4i \pmod{5}$$ and $$(-3-2\sqrt{10}i)^2 \equiv -3-2\sqrt{10}i \pmod{7}.$$
The period of the cycle could be longer as well.
Must these cycles arise for any complex number? If not, what's the justification for why the examples above having cycles?